« Back to channel list

#RubyOnRails - 17 May 2019

« Back 1 day Forward 1 day »
[00:04:12] sirensari2: has joined #RubyOnRails
[00:22:18] zacts: has joined #RubyOnRails
[00:29:29] zacts: has joined #RubyOnRails
[00:32:12] tf2ftw: has joined #RubyOnRails
[00:32:17] jottr: has joined #RubyOnRails
[00:41:52] IGnorAND: figured it out, my require needs small letters, the code needs capitalized letters
[01:00:08] zacts: has joined #RubyOnRails
[01:08:56] skryking: has joined #RubyOnRails
[01:12:35] choke: has joined #RubyOnRails
[01:24:49] octos: has joined #RubyOnRails
[01:29:57] haxx0r: has joined #RubyOnRails
[02:00:57] tdy: has joined #RubyOnRails
[02:19:26] sevenseacat: has joined #RubyOnRails
[02:35:04] Haydos: has joined #RubyOnRails
[02:44:03] jottr: has joined #RubyOnRails
[03:11:15] braincrash: has joined #RubyOnRails
[03:18:39] duderonomy: has joined #RubyOnRails
[03:50:58] LtHummus: has joined #RubyOnRails
[04:22:02] altigraph: has joined #RubyOnRails
[04:22:18] s00pcan: has joined #RubyOnRails
[04:32:38] Saukk: has joined #RubyOnRails
[04:38:17] s00pcan: has joined #RubyOnRails
[04:38:25] srinidhi: has joined #RubyOnRails
[04:40:12] tdy: has joined #RubyOnRails
[04:45:58] jottr: has joined #RubyOnRails
[04:48:44] s00pcan: has joined #RubyOnRails
[04:51:26] MrCrackPotBuilde: has joined #RubyOnRails
[05:05:28] MrCrackPotBuilde: has joined #RubyOnRails
[05:13:22] MrCrackPotBuilde: has joined #RubyOnRails
[05:13:43] haxx0r: has joined #RubyOnRails
[05:21:26] MrCrackPotBuilde: has joined #RubyOnRails
[05:22:37] conta: has joined #RubyOnRails
[05:36:40] conta: has joined #RubyOnRails
[05:57:56] dionysus69: has joined #RubyOnRails
[06:01:25] MrCrackPotBuilde: has joined #RubyOnRails
[06:02:16] w0rd-driven: has joined #RubyOnRails
[06:08:06] altigraph: has joined #RubyOnRails
[06:08:17] dionysus69: is it possible to allocate certain number of threads to the sidekiq queues? I have scenarios where I need multiple single threaded queues, but obviously I don't want to launch separate processes for a single thread
[06:14:17] w0rd-driven: has joined #RubyOnRails
[06:16:16] Dbugger: has joined #RubyOnRails
[06:19:06] LightStalker: has joined #RubyOnRails
[06:35:30] prestorium: has joined #RubyOnRails
[06:37:01] davidh38: has joined #RubyOnRails
[06:37:24] MrCrackPotBuilde: has joined #RubyOnRails
[06:39:24] MrCrackPotBuilde: has joined #RubyOnRails
[06:40:27] davidh38: has joined #RubyOnRails
[06:40:57] MrCrackPotBuilde: has joined #RubyOnRails
[06:43:26] MrCrackPotBuilde: has joined #RubyOnRails
[06:44:24] MrCrackPotBuilde: has joined #RubyOnRails
[06:44:29] Ergo: has joined #RubyOnRails
[06:45:09] old_relik: has joined #RubyOnRails
[06:45:20] old_relik: i want to create a bot user during the startup of my app
[06:45:25] old_relik: what is the right place for doing such a thing?
[06:46:52] jottr: has joined #RubyOnRails
[07:19:27] lxsameer: has joined #RubyOnRails
[07:26:39] davidh38: has joined #RubyOnRails
[07:36:41] haxx0r53: has joined #RubyOnRails
[07:38:19] blackmesa: has joined #RubyOnRails
[07:53:27] MrCrackPotBuilde: has joined #RubyOnRails
[07:57:23] tbuehlmann: old_relik: what's a bot user?
[07:57:29] MrCrackPotBuilde: has joined #RubyOnRails
[07:59:07] old_relik_: has joined #RubyOnRails
[07:59:16] old_relik_: tbuehlmann: it's a fake user in the system
[07:59:22] old_relik_: that must always exist
[07:59:27] old_relik_: to do some automated tasks
[08:00:09] tbuehlmann: you could create it using seeds when setting up the database
[08:00:38] jottr: has joined #RubyOnRails
[08:12:38] jefffrails35: has joined #RubyOnRails
[08:14:29] kapilp: has joined #RubyOnRails
[08:16:44] jefffrails35: has joined #RubyOnRails
[08:18:20] old_relik_: tbuehlmann: i thought of it
[08:18:31] old_relik_: but I want to guarantee its presence
[08:18:37] old_relik_: so i put it in initializer
[08:18:52] old_relik_: but that just runs even if you're running db:migrate or w/e
[08:20:27] xco: has joined #RubyOnRails
[08:24:21] michael_mbp: has joined #RubyOnRails
[08:25:26] MrCrackPotBuilde: has joined #RubyOnRails
[08:47:26] ovnimancer: has joined #RubyOnRails
[08:50:30] michael_mbp: has joined #RubyOnRails
[09:05:42] ur5us: has joined #RubyOnRails
[09:17:51] jottr: has joined #RubyOnRails
[09:35:11] agent_white: has joined #RubyOnRails
[09:46:31] conta: has joined #RubyOnRails
[09:55:19] xco: Hi all! I need help
[09:55:27] xco: I have this method https://gist.github.com/xcobar/9a00e350b71bce66d4f9efe68c32882f
[09:57:02] xco: what i’m trying to achieve is to avoid some “AND” clause when the related attribute is not present. Currently when the attribute is not present, as seen on lines 47-49 the AND clause is printed but with empty values. what i want is for those AND clauses to not show at all when the attributes are absent.
[09:57:07] xco: any help please? :)
[09:58:48] xco: those attributes i’m getting from a form. and i’m trying to do a search in the db, but the search should perform an AND on only the values entered by the user
[09:59:59] arup_r: has joined #RubyOnRails
[10:05:56] DTZUZO: has joined #RubyOnRails
[10:09:13] defsdoor: has joined #RubyOnRails
[10:24:51] davidh38: has joined #RubyOnRails
[10:31:12] tbuehlmann: xco: what have you tried?
[10:34:34] xco: tbuehlmann: i’ve tried this https://gist.github.com/xcobar/9a00e350b71bce66d4f9efe68c32882f
[10:35:36] xco: tbuehlmann: and this too https://gist.github.com/xcobar/9a00e350b71bce66d4f9efe68c32882f#file-sql-rb-L52
[10:37:30] tbuehlmann: and what exactly didn't work with that approach?
[10:41:22] xco: what happens is even when i don’t enter a field in the form, all the AND clauses are printed
[10:41:26] xco: whic is not what i want
[10:41:55] xco: tbuehlmann: i only want to append AND clauses to the sql query only if they are filled that is not blank… in other words, present
[10:42:11] tbuehlmann: no, I mean what didn't work with the "MORE RECENTLY" approach?
[10:43:58] s00pcan: has joined #RubyOnRails
[10:44:22] xco: what i tried recently prints
[10:44:23] xco: tbuehlmann: https://gist.github.com/xcobar/9a00e350b71bce66d4f9efe68c32882f#file-sql-rb-L65
[10:46:07] tbuehlmann: `next unless value = public_send(meth)` <-- do you know what this part does?
[10:50:41] xco: public_send(meth) invokes the public method “meth” where meth is the symbols from the constant
[10:51:00] xco: next unless will skip if the invoked meth is false
[10:52:26] tbuehlmann: it invokes the methods, correct. so is this a good place to check for presence?
[10:52:54] Quintasan: has joined #RubyOnRails
[10:54:11] xco: makes sense
[10:54:15] xco: which will give me this
[10:54:16] xco: next unless value = public_send(meth).present?
[10:54:51] tbuehlmann: that would assign `true` or `false` to value, that's probably not what you want, right?
[10:55:32] lankanmon: has joined #RubyOnRails
[10:56:20] xco: next unless value = public_send(meth).presence
[10:56:27] tbuehlmann: yup, that'll do
[10:57:03] xco: tbuehlmann: thanks :)
[10:57:31] tbuehlmann: btw, this looks like an SQL injection is possible, doesn't it?
[10:57:46] xco: does it?
[10:58:06] xco: i may have to sanitize the contants
[10:58:17] xco: constants
[11:05:09] blackmesa: has joined #RubyOnRails
[11:11:05] jottr: has joined #RubyOnRails
[11:35:48] sandstrom: has joined #RubyOnRails
[11:44:30] MrCrackPotBuilde: has joined #RubyOnRails
[11:56:23] hellekin: has joined #RubyOnRails
[12:13:39] duderonomy: has joined #RubyOnRails
[12:31:03] duderonomy: has joined #RubyOnRails
[12:45:37] tf2ftw: has joined #RubyOnRails
[12:51:12] Jjj: has joined #RubyOnRails
[12:51:29] Jjj: Hello rubyista :)
[12:52:05] Jjj: Im trying to run rake tasj that calls external shell script and want it to be multinthreaded
[12:52:34] Jjj: Found out about multitask but not really clear how to implement any experts could give me some advice?
[12:53:06] Jjj: Basically i have a shell command with unique parame that needs to be executed in parallel.
[12:54:39] Jjj: Have not found a good example perhaps rake task is not the way to go?
[12:58:15] Dbugger: has joined #RubyOnRails
[12:59:25] Dbugger: has joined #RubyOnRails
[13:11:15] regedit: has joined #RubyOnRails
[13:54:21] matthewd: has joined #RubyOnRails
[13:57:25] defsdoor: has joined #RubyOnRails
[14:05:26] apparition: has joined #RubyOnRails
[14:21:17] zacts: has joined #RubyOnRails
[14:22:40] MrCrackPotBuilde: has joined #RubyOnRails
[14:23:39] tf2ftw: has joined #RubyOnRails
[14:25:10] tf2ftw2: has joined #RubyOnRails
[14:30:47] sandstrom: has joined #RubyOnRails
[14:36:08] zacts: has joined #RubyOnRails
[14:38:29] SigizMG: has joined #RubyOnRails
[14:40:38] dionysus69: has joined #RubyOnRails
[14:43:37] davidh38: has joined #RubyOnRails
[14:47:11] amperry: has joined #RubyOnRails
[14:49:05] amperry: hey folks, anyone here use the cocoon gem? I'm trying to add associations calling link_to_add_association multiple times, but when I look at the params, only the last one is passed, rather than an array or other set of them.
[14:49:51] hays: has joined #RubyOnRails
[14:58:35] s00pcan: has joined #RubyOnRails
[15:00:47] dionysus69: has joined #RubyOnRails
[15:08:11] gambl0re: has joined #RubyOnRails
[15:24:56] davidh38: has joined #RubyOnRails
[15:26:26] eddof13: has joined #RubyOnRails
[15:33:40] eddof13: has joined #RubyOnRails
[15:44:15] hays: has joined #RubyOnRails
[15:45:09] weteamsteve: has joined #RubyOnRails
[15:53:49] Technodrome: has joined #RubyOnRails
[15:54:18] tdy: has joined #RubyOnRails
[15:57:44] choke: has joined #RubyOnRails
[16:02:16] orbyt_: has joined #RubyOnRails
[16:13:58] gambl0re: has joined #RubyOnRails
[16:22:32] hays: has joined #RubyOnRails
[16:26:57] DTZUZO: has joined #RubyOnRails
[16:36:11] orbyt_: has joined #RubyOnRails
[16:38:55] duderonomy: has joined #RubyOnRails
[16:41:15] VSpike: has joined #RubyOnRails
[16:42:55] VSpike: Hi! I'm seeing a case where starting `bundle exec rails server puma` will not output any logs on stdout or stderr until I send it a simple curl, at which point it seems to kick into life
[16:43:04] VSpike: Anyone seen anyting similar?
[16:44:24] VSpike: Seems to happen with Ruby 2.5.5 but not 2.4.6, doesn't seem to matter what Rails version
[16:44:37] sandstrom: has joined #RubyOnRails
[16:52:14] s00pcan_: has joined #RubyOnRails
[16:55:05] zacts: has joined #RubyOnRails
[16:58:11] orbyt_: has joined #RubyOnRails
[17:05:10] choke: has joined #RubyOnRails
[17:06:41] feldeci: has joined #RubyOnRails
[17:07:26] ravenousmoose: has joined #RubyOnRails
[17:14:33] dviola: has joined #RubyOnRails
[17:14:53] ravenousmoose: has joined #RubyOnRails
[17:17:39] JavaDog: has joined #RubyOnRails
[17:20:20] sameerynho: has joined #RubyOnRails
[17:20:37] JavaDog: I've been stuck on this thing for almost 2 days. Have a frontend react-native app and I'm trying to hook it up to rails' ActiveStorage with normal http requests. This is what that process should look like: https://github.com/rails/rails/issues/32208#issuecomment-383737803
[17:22:10] JavaDog: On the rails side, specifically on the line linked here, request.content_length is always much shorter than it should be (like 100-200 whereas token[:content_length] is around 22000https://github.com/rails/rails/blob/e4e12185837c1aa9233e4669d0a54b54173e1bf1/activestorage/app/controllers/active_storage/disk_controller.rb#L64
[17:23:41] JavaDog: I don't know where the short number is coming from which causes that conditional to fail. I'm setting the Content-Length header on the client to what it should be.
[17:24:00] hays: has joined #RubyOnRails
[17:32:55] choke: has joined #RubyOnRails
[17:47:29] s00pcan: has joined #RubyOnRails
[17:55:15] choke: has joined #RubyOnRails
[18:07:31] Technodrome: has joined #RubyOnRails
[18:19:07] feldeci: has joined #RubyOnRails
[18:22:53] choke: has joined #RubyOnRails
[18:34:08] davidh38: has joined #RubyOnRails
[18:37:35] timdotrb: has joined #RubyOnRails
[18:37:51] timdotrb: Afternoon, all
[18:38:13] deepredsky: has joined #RubyOnRails
[18:38:28] timdotrb: Anyone know if it’s possible to pluck an Int field, as well as convert the field to string at the same time? Or would I need to do this separately, after the pluck?
[18:40:11] timdotrb: Or conversely, a string to an int?
[18:42:20] orbyt_: has joined #RubyOnRails
[18:44:08] xco: timdotrb: i just looked the the API now, #pluck returns an array of strings so you could then do a #map! on it?
[18:44:17] xco: and convert those values?
[18:44:44] timdotrb: xco: yup :) I arrived at the same conclusion. Thanks!
[18:51:45] choke: has joined #RubyOnRails
[19:10:37] SteenJobs: has joined #RubyOnRails
[19:17:30] buzzbuzzy: has joined #RubyOnRails
[19:20:53] SteenJobs: has joined #RubyOnRails
[19:22:39] choke: has joined #RubyOnRails
[19:31:38] defsdoor: has joined #RubyOnRails
[19:32:40] davidh38: has joined #RubyOnRails
[19:51:50] arup_r: has joined #RubyOnRails
[19:55:49] choke: has joined #RubyOnRails
[19:57:36] eddof13: has joined #RubyOnRails
[20:00:32] jahbrewski: has joined #RubyOnRails
[20:09:31] zacts: has joined #RubyOnRails
[20:57:09] choke: has joined #RubyOnRails
[21:02:55] davidh38: has joined #RubyOnRails
[21:06:52] zacts: has joined #RubyOnRails
[21:26:19] choke: has joined #RubyOnRails
[21:28:58] IGnorAND: sigh, I feel like I'm driving myself crazy
[21:30:34] IGnorAND: An app has an api which returns a JSON response. I made a gem to send a request to the app and get the response. Now I want to use this gem to return a JSON response in a different app. Does my model do the call to the gem? Do I then convert it to JSON in my controller?
[21:48:50] orbyt_: has joined #RubyOnRails
[22:16:53] zacts: has joined #RubyOnRails
[22:35:42] ur5us: has joined #RubyOnRails
[22:38:23] ur5us: has joined #RubyOnRails
[22:41:00] choke: has joined #RubyOnRails
[22:52:39] choke: has joined #RubyOnRails
[23:00:06] zacts: has joined #RubyOnRails
[23:00:17] Exuma: has joined #RubyOnRails
[23:16:02] lato: has joined #RubyOnRails
[23:23:58] uksio: has joined #RubyOnRails
[23:28:31] Technodrome: has joined #RubyOnRails
[23:32:58] Exuma: has joined #RubyOnRails
[23:36:38] ellcs: has joined #RubyOnRails
[23:55:30] weaksauce: IGnorAND can you expand on what you are trying to do?