« Back to channel list

#RubyOnRails - 15 November 2018

« Back 1 day Forward 1 day »
[00:04:44] ellcs: has joined #RubyOnRails
[00:28:39] Dimik: has joined #RubyOnRails
[00:32:40] elcontrastador: has joined #RubyOnRails
[00:35:45] elcontrastador: Is there a recommended irc channel for web design?
[00:36:12] eckhardt_: has joined #RubyOnRails
[00:51:44] orbyt_: For specifically design/
[00:56:57] Exuma: has joined #RubyOnRails
[00:58:50] safetypin: has joined #RubyOnRails
[01:06:46] ellcs: has joined #RubyOnRails
[01:06:53] sevenseacat: has joined #RubyOnRails
[01:34:58] blackcross: has joined #RubyOnRails
[02:15:36] safetypin: has joined #RubyOnRails
[02:17:31] safetypin: has joined #RubyOnRails
[02:18:23] hnanon: has joined #RubyOnRails
[02:47:07] roshanavand: has joined #RubyOnRails
[02:58:22] safetypin: has joined #RubyOnRails
[03:02:13] roshanavand: has joined #RubyOnRails
[03:02:21] tdy1: has joined #RubyOnRails
[03:42:31] darkhanb: has joined #RubyOnRails
[03:54:52] hive-mind: has joined #RubyOnRails
[04:09:26] braincrash: has joined #RubyOnRails
[04:29:52] hnanon: Is there a way to access the last param hash of a nested attribute?
[04:30:51] Radar: hnanon: what do you have now?
[04:31:42] hnanon: https://dpaste.de/KswP
[04:32:14] hnanon: In that instance it's images_attributes 1
[04:32:38] hnanon: It'll be different for other variants.
[04:32:51] hnanon: I want to always get the last images_attributes.
[04:33:02] hnanon: That's the one that will have the file.
[04:33:16] hnanon: (to attach via active_storage)
[04:33:35] hnanon: I probably won
[04:33:46] hnanon: won't end up doing it this way...
[04:33:48] Radar: If that's the one that always has the file, then I would suggest params[:variant][:image_attributes].select { |_index, image| image.key?("file") }
[04:34:00] hnanon: but I'm just curious how that would be done.
[04:34:10] Radar: But I would first look to see if I could get rid of the nested attributes altogether if you only care about one bit of data
[04:34:35] hnanon: Radar: Yup, that's what I'll probably do.
[04:35:27] hnanon: Your solution seems perfect, though, if I do end up keeping the nested attributes.
[04:36:24] hnanon: Radar: Did Spree create a default variant when a product was created?
[04:37:00] hnanon: I think variants should be be added to carts and products...from what I gather so far.
[04:37:15] Radar: hnanon: yeah, spree has a master variant for a product.
[04:37:16] hnanon: *added to cart, not products
[04:37:22] Radar: the variant is added to the cart
[04:37:27] Radar: line_item had a variant_id
[04:37:52] hnanon: The master variant was created in an after action?
[04:47:33] Radar: I think at the same time the product was created
[04:48:00] roshanavand: has joined #RubyOnRails
[04:52:13] ivanskie: has joined #RubyOnRails
[04:54:07] za1b1tsu: has joined #RubyOnRails
[04:57:14] hnanon: Radar, can I just use the .dig method too (too look for the file key)?
[04:57:45] Radar: hnanon: possibly. Might not work if you're calling it from params because image_attributes is an array
[04:57:56] Radar: Oops, sorry, it's a hash isn't it?
[04:58:06] hnanon: Yes, it's an array
[04:58:08] Radar: params.dig(:variant, :image_attributes, "1", :file)
[04:58:10] hnanon: I mean a hash
[05:10:16] sarink: has joined #RubyOnRails
[05:12:08] sarink: can anyone explain why the scenario is still being validated in this example? https://gist.github.com/sarink/f74dc9a50595204916d6c2e2839cbda2
[05:12:29] Radar: sarink: well that looks like fun. What version of Rails?
[05:12:49] sarink: specifically 5.2.0
[05:12:59] Radar: thank you
[05:13:34] Radar: I'll try to reproduce it.
[05:14:19] Radar: sarink: I can't reproduce it locally.
[05:15:04] sevenseacat: console needs to be reloaded?
[05:17:20] Radar: sevenseacat: good point
[05:18:49] sarink: 😊 it's bc i'm a liar, and i left out the "belongs_to: :scenario" line, _my_ validation is irrelevant (bc the belongs_to isn't marked optional)
[05:19:17] Radar: (tbh that was going to be my next guess)
[05:31:23] Exuma: has joined #RubyOnRails
[05:33:01] MoritaShinobu: has joined #RubyOnRails
[06:00:36] Puffball: has joined #RubyOnRails
[06:00:58] Mutsuhito: has joined #RubyOnRails
[06:01:49] wmoxam: has joined #RubyOnRails
[06:12:44] Exuma: has joined #RubyOnRails
[06:17:43] conta: has joined #RubyOnRails
[06:25:01] roshanavand: has joined #RubyOnRails
[06:29:35] dnewkerk: has joined #RubyOnRails
[06:30:37] ivanskie: has joined #RubyOnRails
[06:42:47] Xiti: has joined #RubyOnRails
[07:01:23] havenwood: has joined #RubyOnRails
[07:05:28] Exuma: has joined #RubyOnRails
[07:28:17] MoritaShinobu: has joined #RubyOnRails
[07:41:05] hammer065: has joined #RubyOnRails
[07:58:48] srinidhi: has joined #RubyOnRails
[08:15:43] za1b1tsu: has joined #RubyOnRails
[08:22:20] roshanavand: has joined #RubyOnRails
[08:39:14] bothari: has joined #RubyOnRails
[08:40:05] ellcs: has joined #RubyOnRails
[09:07:32] jlebrech: has joined #RubyOnRails
[09:08:27] jlebrech: is it possible to do an after_action for POST/PATCH/DELETE actions?
[09:08:47] jlebrech: i could check the controller action within that i guess
[09:09:23] Fernando-Basso: has joined #RubyOnRails
[09:15:19] lxsameer: has joined #RubyOnRails
[09:20:00] roshanavand: has joined #RubyOnRails
[09:23:10] LambdaSource: has joined #RubyOnRails
[09:23:29] LambdaSource: has joined #RubyOnRails
[09:24:03] adgtl: has joined #RubyOnRails
[09:24:12] conta: has joined #RubyOnRails
[09:26:21] adgtl: Hello folks
[09:26:33] adgtl: what's the best way to add basic authentication to Ruby on Rails application
[09:32:40] Psy-Q: has joined #RubyOnRails
[09:37:31] Psy-Q: can i not assign two new instances of an AR model to another AR model in a while loop? like so: https://dpaste.de/Xp9O
[09:37:48] Psy-Q: it seems only one database is ever assigned with e.g. @db_count = 2, the other one disappears
[09:50:38] Psy-Q: hc is an unsaved record at the time, i need to assign lots of related models to it before it gets saved
[09:53:40] whysthatso: has joined #RubyOnRails
[09:56:44] LambdaSource: has joined #RubyOnRails
[10:12:45] havenwood: has joined #RubyOnRails
[10:36:53] voolik: has joined #RubyOnRails
[10:37:26] LambdaSource: has joined #RubyOnRails
[11:11:11] nickjj: has joined #RubyOnRails
[11:15:08] apparition: has joined #RubyOnRails
[11:18:49] srinidhi: has joined #RubyOnRails
[11:35:42] roshanavand: has joined #RubyOnRails
[11:42:54] conta: has joined #RubyOnRails
[11:47:29] lomex: has joined #RubyOnRails
[11:50:26] Psy-Q: i can't figure this out
[11:50:53] Psy-Q: why when i add two of those database records and hc.databases shows them plain and clear, both records are valid, when i save hc it saves only the first database?
[12:05:46] conta: has joined #RubyOnRails
[12:07:11] andywww: has joined #RubyOnRails
[12:12:31] lankanmon: has joined #RubyOnRails
[12:12:36] Saukk: has joined #RubyOnRails
[12:24:24] za1b1tsu: has joined #RubyOnRails
[12:33:12] kapil____: has joined #RubyOnRails
[12:34:02] lomex: has joined #RubyOnRails
[12:41:05] za1b1tsu: has joined #RubyOnRails
[12:41:33] whysthatso: has joined #RubyOnRails
[12:53:28] uks: has joined #RubyOnRails
[12:53:54] uksio: has joined #RubyOnRails
[12:54:48] uks: has joined #RubyOnRails
[12:57:34] logik-bomb: I'm a bit lost on how to plan this. My record belongs to a category. Depending on the category, the record should have different options. For instance. Record is category car and should have a value for the colour and number of doors but if the record is a cake it should have values for amount of sugar and weight. Just trying to get my head around the modeling. Thanks
[13:29:10] rien_: has joined #RubyOnRails
[13:33:42] rien_: Hi there, a few months ago I've submitted a PR (https://github.com/rails/rails/pull/33957) with a bugfix, but it is still open. Is there something I can do to get it merged? I can resolve the merge conflict again, but not if the PR will continue be ignored ...
[13:35:30] tbuehlmann: logik-bomb: a category could have many "attributes" (colour, number of doors, …), and each record would have one "value" for each attribute the associated category has. "attributes" and "values" being tables
[13:36:36] tbuehlmann: rien_: resolve the conflicts and directly mention a core member
[13:37:01] Ergo: has joined #RubyOnRails
[13:37:17] rien_: Any suggestion who I can mention? :)
[13:43:40] tbuehlmann: matthewd? *runs*
[13:44:20] rien__: has joined #RubyOnRails
[14:26:38] chouhoulis: has joined #RubyOnRails
[14:45:50] EnderMB: has joined #RubyOnRails
[15:01:35] thortron: has joined #RubyOnRails
[15:06:23] roshanavand: has joined #RubyOnRails
[15:29:33] jottr: has joined #RubyOnRails
[15:38:30] roshanavand: has joined #RubyOnRails
[15:46:23] chouhoulis: has joined #RubyOnRails
[15:46:23] crankharder: has joined #RubyOnRails
[15:47:09] Exuma: has joined #RubyOnRails
[15:49:56] za1b1tsu: has joined #RubyOnRails
[16:02:10] roshanavand: has joined #RubyOnRails
[16:09:27] whysthatso: has joined #RubyOnRails
[16:19:20] za1b1tsu: has joined #RubyOnRails
[16:21:14] Cork: has joined #RubyOnRails
[16:30:35] roshanavand: has joined #RubyOnRails
[16:31:17] dviola: has joined #RubyOnRails
[16:33:00] SteenJobs: has joined #RubyOnRails
[16:37:17] ivanskie: has joined #RubyOnRails
[16:40:24] LambdaSource: has joined #RubyOnRails
[16:42:29] jottr: has joined #RubyOnRails
[16:45:17] SteenJobs: has joined #RubyOnRails
[16:50:39] za1b1tsu: has joined #RubyOnRails
[16:51:04] Cork: has joined #RubyOnRails
[16:56:45] za1b1tsu: has joined #RubyOnRails
[17:03:09] za1b1tsu: has joined #RubyOnRails
[17:09:33] conta: has joined #RubyOnRails
[17:15:25] orbyt_: has joined #RubyOnRails
[17:19:13] gregf_: has joined #RubyOnRails
[17:23:56] darkhanb: has joined #RubyOnRails
[17:24:15] sameerynho: has joined #RubyOnRails
[17:43:49] whysthatso: has joined #RubyOnRails
[17:53:50] Saukk: has joined #RubyOnRails
[18:02:47] Dbugger: has joined #RubyOnRails
[18:03:40] eckhardt_: has joined #RubyOnRails
[18:05:33] SteenJobs: has joined #RubyOnRails
[18:11:32] reber: has joined #RubyOnRails
[18:13:32] reber__: has joined #RubyOnRails
[18:15:36] conta: has joined #RubyOnRails
[18:20:43] gthank: has joined #RubyOnRails
[18:27:50] srruby: has joined #RubyOnRails
[18:29:23] jetchisel: has joined #RubyOnRails
[18:48:03] matcouto: has joined #RubyOnRails
[18:56:08] SteenJobs: has joined #RubyOnRails
[18:57:33] Fernando-Basso: has joined #RubyOnRails
[19:06:14] VeryBewitching: has joined #RubyOnRails
[19:06:47] VeryBewitching: Afternoon folks; can someone suggest a means with Rails 5 to convert a view to a PDF?
[19:07:03] VeryBewitching: I need to be able to support Chart.js charts in the view.
[19:14:24] beowuff: has joined #RubyOnRails
[19:19:32] uks: has joined #RubyOnRails
[19:20:38] srruby: dev/test/staging/production - Should I use one Linode(server) for each rails enviornment ?
[19:20:42] matcouto: Hey guys, trying to get my head around on creating polymorphic records via API. I wonder how the params structure should look like in an example like this https://dpaste.de/heoM ?
[19:21:40] orbyt_: has joined #RubyOnRails
[19:38:23] Exuma: has joined #RubyOnRails
[19:51:08] conta: has joined #RubyOnRails
[19:58:38] Exuma: has joined #RubyOnRails
[20:35:14] ur5us: has joined #RubyOnRails
[20:42:30] jackrandom: has joined #RubyOnRails
[20:43:28] darkhanb: has joined #RubyOnRails
[20:51:41] matcouto: has joined #RubyOnRails
[20:54:08] ausmat: has joined #RubyOnRails
[21:04:04] roshanavand: has joined #RubyOnRails
[21:10:23] GodFather_: has joined #RubyOnRails
[21:17:14] darkhanb: has joined #RubyOnRails
[21:25:55] Exuma: has joined #RubyOnRails
[21:32:20] ausmat: has joined #RubyOnRails
[22:06:14] Exuma: has joined #RubyOnRails
[22:21:56] ss_much: has joined #RubyOnRails
[22:27:24] blackmesa: has joined #RubyOnRails
[22:32:39] funnel: has joined #RubyOnRails
[22:34:43] hive-mind: has joined #RubyOnRails
[22:37:53] mochiyoda: has joined #RubyOnRails
[22:52:40] chouhoulis: has joined #RubyOnRails
[23:16:12] jaddison: has joined #RubyOnRails
[23:26:45] whysthatso: has left #RubyOnRails: ()
[23:27:54] whysthatso: has joined #RubyOnRails
[23:30:23] DTZUZO: has joined #RubyOnRails
[23:31:37] lexileo: has joined #RubyOnRails
[23:37:03] jetchisel: has joined #RubyOnRails
[23:53:46] argoneus: has joined #RubyOnRails