« Back to channel list

#RubyOnRails - 13 September 2018

« Back 1 day Forward 1 day »
[00:00:23] prettybTech: has joined #RubyOnRails
[00:08:08] safetypin: has joined #RubyOnRails
[00:08:51] cagomez: has joined #RubyOnRails
[00:17:52] s2013: has joined #RubyOnRails
[00:29:41] onecaesar: has joined #RubyOnRails
[00:30:49] onecaesar: I'm looking to return an array of hashes from a form. Here is my example https://www.pastiebin.com/5b99aec2d8214
[00:31:22] onecaesar: The form has 2 hashes, each returning gender either male or female, I'm not sure how to get rails strong params to work with this as I'd like to keep adding more people to the group
[00:31:45] onecaesar: and to clarify, the form hash could should be able to go up to say 20 + members
[00:31:52] onecaesar: hash count*
[00:31:58] Technodrome: has joined #RubyOnRails
[00:32:39] onecaesar: Happy to further clarify if anyone has a moment to take a look
[00:33:13] s2013: has joined #RubyOnRails
[00:46:57] onecaesar: I just came across this where they suggest to use multiple forms - https://stackoverflow.com/questions/44513382/how-can-i-make-multiple-radio-button-groups-with-same-name
[00:47:40] onecaesar: Ideally I could get the POST request in one submit without having to use js / jquery to create a data object and then submit that
[01:01:04] w09x: has joined #RubyOnRails
[01:05:12] ss_much: has joined #RubyOnRails
[01:09:58] lxsameer: has joined #RubyOnRails
[01:16:10] sevenseacat: has joined #RubyOnRails
[01:36:20] frewsxcv: any suggestions for how to write an open source rails extension that relies on a cache?
[01:44:34] FastJack: has joined #RubyOnRails
[01:58:30] duderonomy: has joined #RubyOnRails
[02:07:07] s2013: has joined #RubyOnRails
[02:09:09] Saukk: has joined #RubyOnRails
[02:25:59] kotepillar_: has joined #RubyOnRails
[02:26:33] weaksauce: has joined #RubyOnRails
[02:34:43] s2013: has joined #RubyOnRails
[02:37:08] safetypin: has joined #RubyOnRails
[02:47:11] safetypin: has joined #RubyOnRails
[02:53:18] pwnd_nsfw: has joined #RubyOnRails
[03:04:11] wherescaleb: has joined #RubyOnRails
[03:06:07] wherescaleb: anyone online?
[03:09:57] braincrash: has joined #RubyOnRails
[03:10:48] lxsameer: has joined #RubyOnRails
[03:24:59] Dimik: has joined #RubyOnRails
[03:49:28] kotepillar_: has joined #RubyOnRails
[03:51:05] kotepillar_: has joined #RubyOnRails
[03:54:07] DTZUZO: has joined #RubyOnRails
[04:08:16] orbyt_: has joined #RubyOnRails
[04:21:32] pwnd_nsfw: pi, please compile ruby faster, t
[04:24:51] s2013: has joined #RubyOnRails
[04:26:11] fragamus: has joined #RubyOnRails
[04:31:43] eckhardt: has joined #RubyOnRails
[04:54:42] psychoslave: has joined #RubyOnRails
[05:10:32] pwnd_nsfw: bootsnap blows up on rasp pi nice
[05:12:37] reber: has joined #RubyOnRails
[05:32:46] baweaver: sevenseacat: what do you call [] and []= methods?
[05:33:06] baweaver: Someone asked how you pronounce them out loud, never thought about it.
[05:35:05] kapil___: has joined #RubyOnRails
[05:37:23] duderonomy: has joined #RubyOnRails
[05:50:44] duderonomy: has joined #RubyOnRails
[05:59:34] kotepillar_: has joined #RubyOnRails
[06:02:36] psychoslave: has joined #RubyOnRails
[06:08:23] kotepillar_: has joined #RubyOnRails
[06:08:40] LiftLeft2: has joined #RubyOnRails
[06:13:14] za1b1tsu: has joined #RubyOnRails
[06:14:47] sandstrom: has joined #RubyOnRails
[06:16:19] MoritaShinobu: has joined #RubyOnRails
[06:16:43] duderonomy: has joined #RubyOnRails
[06:23:21] sevenseacat: I'd probably call them 'array' and 'array equals'
[06:23:27] sevenseacat: if I had to say them out loud
[06:27:22] armyriad: has joined #RubyOnRails
[06:37:38] duderonomy: has joined #RubyOnRails
[06:45:15] za1b1tsu: has joined #RubyOnRails
[07:02:36] duderonomy: has joined #RubyOnRails
[07:02:39] Technodrome: has joined #RubyOnRails
[07:09:15] sameerynho: has joined #RubyOnRails
[07:17:19] duderonomy: has joined #RubyOnRails
[07:19:11] duderonomy: has joined #RubyOnRails
[07:42:42] sandstrom: has joined #RubyOnRails
[07:50:40] cschneid_: has joined #RubyOnRails
[07:53:05] DTZUZO: has joined #RubyOnRails
[08:00:00] lessless_: has joined #RubyOnRails
[08:01:27] lxsameer: has joined #RubyOnRails
[08:01:55] lexileo: has joined #RubyOnRails
[08:04:07] lessless_: hi folks! how to make #includes() to include all STI subclasses?
[08:21:00] cabotto: has joined #RubyOnRails
[08:46:12] lessless_: Maybe something like Foo.includes(:sti_superclass).where("sti_table.type in ('type1', 'type2')").references(:sti_table).find(1) ?
[08:47:58] uksio: has joined #RubyOnRails
[08:59:03] ur5us: has joined #RubyOnRails
[09:06:53] sandstrom: has joined #RubyOnRails
[09:07:18] titon_: has joined #RubyOnRails
[09:07:47] titon_: hi, if i run a RoR api serving using puma. Is there a need for nginx?
[09:19:48] jottr: has joined #RubyOnRails
[09:37:51] sandstrom: has joined #RubyOnRails
[09:43:42] za1b1tsu: has joined #RubyOnRails
[09:49:52] jottr: has joined #RubyOnRails
[09:53:48] za1b1tsu: has joined #RubyOnRails
[09:55:29] kapil___: has joined #RubyOnRails
[10:10:29] lessless_: has joined #RubyOnRails
[10:23:26] jottr: has joined #RubyOnRails
[10:30:04] NL3limin4t0r: titon_: If you're running a development environment you're good to go with just puma. In production it's recommended to use a CDN or file server (like apache or nginx) to serve the assets.
[10:30:34] NL3limin4t0r: For detailed info have a look at: https://guides.rubyonrails.org/asset_pipeline.html#in-production
[10:34:05] NL3limin4t0r: titon_: If you have an API-only application you probably don't have any assets, thus no need to use a CDN or file server.
[10:34:26] mrbubbles: has joined #RubyOnRails
[10:55:31] ariedler: has joined #RubyOnRails
[11:17:08] ur5us: has joined #RubyOnRails
[11:25:24] charlielor: has joined #RubyOnRails
[11:26:36] titon_: NL3limin4t0r: that is what i'm wondering if nginx provides anything extra when you don't serve any static data and only a api
[11:27:31] xall: has joined #RubyOnRails
[11:29:36] titon_: maybe just let nginx handle the ssl
[11:34:49] jottr: has joined #RubyOnRails
[11:41:36] kotepillar_: has joined #RubyOnRails
[11:47:48] Psy-Q: can i use the ActiveRecord validations standalone? like validate_numericality_of(this_var)?
[11:48:46] tbuehlmann: no, you'll need to include ActiveModel::Validations into your class in order to use them
[11:50:18] Psy-Q: ah, hrm. that's a bit inconvenient since what needs validation comes from a free-form JSON hash and depending on what's further up in the hash, different types of validations further down would need to trigger
[11:50:40] Psy-Q: maybe i can do something with if: to if down all the way into the hash
[11:53:11] psychoslave: has joined #RubyOnRails
[11:58:50] Psy-Q: hm, it's not even finding its is_hosting? method right inside the same class when i use if: is_hosting? as in the example. NoMethodError. weird.
[12:00:16] Psy-Q: ah, it wants the symbol. all good :)
[12:01:32] Psy-Q: yes, this could work. i do the branching up top in validates_with: MyFooValidator, if: is_giraffe?
[12:01:54] Psy-Q: and then i have many MyFooValidators that include just ActiveModel validations they need depending on the shape of the hash
[12:02:16] Psy-Q: i mean if: :is_giraffe? of course, no good making the same mistake twice
[12:02:57] lessless_: has joined #RubyOnRails
[12:19:00] Psy-Q: ah, damn. that won't work. since it's nested and i can't do validates_numericality_of :my_hash['something_deep']['inside_of_me']
[12:20:10] tbuehlmann: can't you parse that json object into proper objects and validate these?
[12:23:02] Psy-Q: not quite sure, since the shape of the array is arbitrary and i only need to validate some elements that are guaranteed to be there
[12:23:55] Psy-Q: like configuration['mysql_database'] = true, that can only be true or false and not nil. and if it's true then there can also be configuration['mysql_database_name'] = 'foobar' which must be a string and unique
[12:24:24] za1b1tsu: has joined #RubyOnRails
[12:24:33] Psy-Q: i just saw a gem called dry-validation that allows you to write a validation schema and then applies that to any data structure (ruby hash, whatever). maybe that's a better option
[12:25:17] tbuehlmann: sure, whatever floats your boat
[12:26:05] Psy-Q: i thought the built-in validations might be best because.. they're built in :) but maybe they are simply wrong if you're not validating things that are actual fields on your model
[12:26:31] Psy-Q: https://dry-rb.org/gems/dry-validation/ this is the gem
[12:33:53] jottr: has joined #RubyOnRails
[12:35:01] lexileo: has joined #RubyOnRails
[12:36:00] dviola: has joined #RubyOnRails
[12:38:45] psychoslave: has joined #RubyOnRails
[12:44:21] brightbeat: has joined #RubyOnRails
[12:48:06] knight33: has joined #RubyOnRails
[12:54:45] sevenseacat: has joined #RubyOnRails
[13:09:10] sandstrom: has joined #RubyOnRails
[13:18:18] jottr: has joined #RubyOnRails
[13:22:43] Psy-Q: i got it to validate nested things. now i just need to propagate the error messages properly upwards
[13:40:24] desperek: has joined #RubyOnRails
[14:00:36] fcser_: has joined #RubyOnRails
[14:48:52] charlielor: has joined #RubyOnRails
[14:55:29] rikkipitt: has joined #RubyOnRails
[14:58:05] beholders_eye: has joined #RubyOnRails
[15:02:57] psychoslave: has joined #RubyOnRails
[15:05:34] Technodrome: has joined #RubyOnRails
[15:08:34] brandoncc: has joined #RubyOnRails
[15:15:24] jottr: has joined #RubyOnRails
[15:16:23] za1b1tsu: has joined #RubyOnRails
[15:17:06] hervie: has joined #RubyOnRails
[15:23:04] knight33: has joined #RubyOnRails
[15:24:57] jottr: has joined #RubyOnRails
[15:26:30] conta1: has joined #RubyOnRails
[15:37:07] chouhoulis: has joined #RubyOnRails
[15:45:16] beowuff: has joined #RubyOnRails
[15:46:33] ivanskie: has joined #RubyOnRails
[15:53:01] conta1: has joined #RubyOnRails
[16:00:23] cagomez: has joined #RubyOnRails
[16:01:35] Dbugger: has joined #RubyOnRails
[16:10:56] lxsameer: has joined #RubyOnRails
[16:20:49] [Butch]: has joined #RubyOnRails
[16:20:53] lxsameer: has joined #RubyOnRails
[16:25:11] brandoncc: has joined #RubyOnRails
[16:28:25] charlielor: has joined #RubyOnRails
[16:30:58] lxsameer: has joined #RubyOnRails
[16:41:09] lxsameer: has joined #RubyOnRails
[16:45:45] Saukk: has joined #RubyOnRails
[16:50:42] prettybTech: has joined #RubyOnRails
[16:50:53] lxsameer: has joined #RubyOnRails
[16:58:47] orbyt_: has joined #RubyOnRails
[17:01:08] lxsameer: has joined #RubyOnRails
[17:11:08] lxsameer: has joined #RubyOnRails
[17:12:10] Technodrome: has joined #RubyOnRails
[17:16:57] s2013: has joined #RubyOnRails
[17:20:54] lxsameer: has joined #RubyOnRails
[17:22:34] prettybTech: has joined #RubyOnRails
[17:25:40] eckhardt: has joined #RubyOnRails
[17:31:04] lxsameer: has joined #RubyOnRails
[17:35:24] krawchyk: has joined #RubyOnRails
[17:36:50] za1b1tsu: has joined #RubyOnRails
[17:40:57] lxsameer: has joined #RubyOnRails
[17:41:46] za1b1tsu: has joined #RubyOnRails
[17:45:50] defsdoor: has joined #RubyOnRails
[17:48:43] GodFather_: has joined #RubyOnRails
[17:49:12] krawchyk: has joined #RubyOnRails
[17:50:08] duderonomy: has joined #RubyOnRails
[17:51:03] lxsameer: has joined #RubyOnRails
[17:52:16] Linuus: has joined #RubyOnRails
[17:57:19] charlielor: has joined #RubyOnRails
[18:00:37] ivanskie: has joined #RubyOnRails
[18:01:04] lxsameer: has joined #RubyOnRails
[18:04:30] jottr: has joined #RubyOnRails
[18:04:48] orbyt_: has joined #RubyOnRails
[18:06:30] samort7: has joined #RubyOnRails
[18:07:16] armyriad: has joined #RubyOnRails
[18:11:06] lxsameer: has joined #RubyOnRails
[18:20:48] lxsameer: has joined #RubyOnRails
[18:29:43] sandstrom: has joined #RubyOnRails
[18:30:05] sameerynho: has joined #RubyOnRails
[18:30:08] LiftLeft: has joined #RubyOnRails
[18:30:54] lxsameer: has joined #RubyOnRails
[18:36:02] prettybTech: has joined #RubyOnRails
[18:41:00] lxsameer: has joined #RubyOnRails
[18:50:58] cpruitt: has joined #RubyOnRails
[18:51:09] lxsameer: has joined #RubyOnRails
[18:55:21] charlielor: has joined #RubyOnRails
[18:56:10] Technodrome: has joined #RubyOnRails
[18:58:45] charlielor: has joined #RubyOnRails
[18:59:13] orbyt_: has joined #RubyOnRails
[19:00:48] lxsameer: has joined #RubyOnRails
[19:12:03] Saukk: has joined #RubyOnRails
[19:22:01] tdy: has joined #RubyOnRails
[19:33:25] charlielor: has joined #RubyOnRails
[19:37:23] Technodrome: has joined #RubyOnRails
[19:45:15] orbyt_: has joined #RubyOnRails
[19:45:30] DTZUZO: has joined #RubyOnRails
[19:48:40] prettybTech: has joined #RubyOnRails
[19:51:23] jottr: has joined #RubyOnRails
[20:13:07] Technodrome: has joined #RubyOnRails
[20:22:45] Linuus: has joined #RubyOnRails
[20:38:15] DTZUZO: has joined #RubyOnRails
[20:44:31] DTZUZO: has joined #RubyOnRails
[20:46:10] cagomez: has joined #RubyOnRails
[20:55:17] s2013: has joined #RubyOnRails
[21:04:41] lxsameer: has joined #RubyOnRails
[21:06:44] tdy: has joined #RubyOnRails
[21:07:16] chouhoulis: has joined #RubyOnRails
[21:13:33] s2013: has joined #RubyOnRails
[21:16:26] za1b1tsu: has joined #RubyOnRails
[21:17:59] chouhoulis: has joined #RubyOnRails
[21:19:19] chouhoulis: has joined #RubyOnRails
[21:24:29] chouhoulis: has joined #RubyOnRails
[21:29:55] chouhoulis: has joined #RubyOnRails
[21:31:41] orbyt_: has joined #RubyOnRails
[21:33:20] Technodrome: has joined #RubyOnRails
[21:35:08] orbyt_: has joined #RubyOnRails
[21:35:21] chouhoulis: has joined #RubyOnRails
[21:47:13] chouhoulis: has joined #RubyOnRails
[21:52:14] jottr: has joined #RubyOnRails
[21:52:42] chouhoulis: has joined #RubyOnRails
[21:54:00] orbyt_: has joined #RubyOnRails
[21:55:49] fragamus: has joined #RubyOnRails
[21:56:58] sarmiena_: has joined #RubyOnRails
[22:00:20] ivanskie: has joined #RubyOnRails
[22:00:57] tdy: has joined #RubyOnRails
[22:03:35] chouhoulis: has joined #RubyOnRails
[22:04:21] ciro: has joined #RubyOnRails
[22:05:17] s2013: has joined #RubyOnRails
[22:08:29] pabloh: has joined #RubyOnRails
[22:09:35] prettybTech: has joined #RubyOnRails
[22:10:04] chouhoulis: has joined #RubyOnRails
[22:10:09] za1b1tsu: has joined #RubyOnRails
[22:16:34] chouhoulis: has joined #RubyOnRails
[22:20:28] snickers: has joined #RubyOnRails
[22:22:03] chouhoulis: has joined #RubyOnRails
[22:24:24] nickjj: has joined #RubyOnRails
[22:27:29] chouhoulis: has joined #RubyOnRails
[22:27:30] dblessing: has joined #RubyOnRails
[22:32:51] chouhoulis: has joined #RubyOnRails
[22:37:06] prettybTech: has joined #RubyOnRails
[22:38:24] chouhoulis: has joined #RubyOnRails
[22:40:36] ellcs: has joined #RubyOnRails
[22:44:43] chouhoulis: has joined #RubyOnRails
[22:50:07] chouhoulis: has joined #RubyOnRails
[23:01:03] chouhoulis: has joined #RubyOnRails
[23:02:54] tdy: has joined #RubyOnRails
[23:05:21] lxsameer: has joined #RubyOnRails
[23:06:27] chouhoulis: has joined #RubyOnRails
[23:11:49] chouhoulis: has joined #RubyOnRails
[23:17:14] chouhoulis: has joined #RubyOnRails
[23:18:57] fragamus: has joined #RubyOnRails
[23:22:35] eckhardt: has joined #RubyOnRails
[23:22:41] chouhoulis: has joined #RubyOnRails
[23:28:12] chouhoulis: has joined #RubyOnRails
[23:33:32] chouhoulis: has joined #RubyOnRails
[23:36:09] eckhardt: has joined #RubyOnRails
[23:38:59] chouhoulis: has joined #RubyOnRails
[23:44:22] chouhoulis: has joined #RubyOnRails
[23:49:24] xall: has joined #RubyOnRails
[23:49:47] chouhoulis: has joined #RubyOnRails
[23:54:49] jottr: has joined #RubyOnRails
[23:55:29] chouhoulis: has joined #RubyOnRails
[23:57:08] cagomez: has joined #RubyOnRails
[23:58:12] za1b1tsu: has joined #RubyOnRails
[23:59:09] cagomez: has joined #RubyOnRails