« Back to channel list

#RubyOnRails - 06 September 2019

« Back 1 day Forward 1 day »
[00:11:27] skryking: has joined #RubyOnRails
[00:15:54] uksio: has joined #RubyOnRails
[00:16:03] Axsuul: has joined #RubyOnRails
[01:37:36] ebsen: has joined #RubyOnRails
[02:07:33] Saukk: has joined #RubyOnRails
[02:18:15] duderonomy: has joined #RubyOnRails
[02:58:36] alan_w: has joined #RubyOnRails
[03:59:10] russt: has joined #RubyOnRails
[04:12:08] LightStalker: has joined #RubyOnRails
[04:14:31] psilly0: has joined #RubyOnRails
[04:16:29] dustinm`: has joined #RubyOnRails
[04:43:04] dtzuzu: has joined #RubyOnRails
[04:47:36] gambl0re: has joined #RubyOnRails
[04:56:54] dionysus69: has joined #RubyOnRails
[05:01:27] gambl0r3: has joined #RubyOnRails
[05:03:45] Technodrome: has joined #RubyOnRails
[05:18:38] Chuguniy: has joined #RubyOnRails
[05:24:24] duderonomy: has joined #RubyOnRails
[05:31:17] duderonomy: has joined #RubyOnRails
[05:34:47] schaerli: has joined #RubyOnRails
[05:38:51] Ropeney: has joined #RubyOnRails
[05:43:32] duderonomy: has joined #RubyOnRails
[05:49:35] duderonomy: has joined #RubyOnRails
[05:52:31] duderonomy: has joined #RubyOnRails
[05:54:33] fyber: has joined #RubyOnRails
[06:01:46] duderonomy: has joined #RubyOnRails
[06:06:39] duderonomy: has joined #RubyOnRails
[06:31:21] duderonomy: has joined #RubyOnRails
[06:43:16] duderonomy: has joined #RubyOnRails
[06:50:31] corellian: has joined #RubyOnRails
[06:59:54] lankanmon: has joined #RubyOnRails
[07:07:44] lxsameer: has joined #RubyOnRails
[07:17:00] psilly0: has joined #RubyOnRails
[07:23:05] fyber: has joined #RubyOnRails
[07:54:27] TvL2386: has joined #RubyOnRails
[07:59:29] schne1der: has joined #RubyOnRails
[08:24:53] Fernando-Basso: has joined #RubyOnRails
[08:26:16] dionysus69: has joined #RubyOnRails
[08:28:35] xco: has joined #RubyOnRails
[08:35:22] ariedler: has joined #RubyOnRails
[08:42:19] Dbugger: has joined #RubyOnRails
[08:46:02] skryking: has joined #RubyOnRails
[09:39:54] schne1der: has joined #RubyOnRails
[09:45:45] hightower3: has joined #RubyOnRails
[10:14:17] rabbit0: has joined #RubyOnRails
[10:16:48] srinidhi: has joined #RubyOnRails
[10:35:36] Cork: has joined #RubyOnRails
[10:36:46] ariedler: has joined #RubyOnRails
[10:55:09] ariedler: has joined #RubyOnRails
[11:03:26] mikecmpbll: has joined #RubyOnRails
[11:16:28] GodFather: has joined #RubyOnRails
[11:20:21] Cork: i would like to test if asset:precompile needs to run, anyone know if there are a good way to test that?
[11:31:01] Aherin: has joined #RubyOnRails
[11:34:54] Cork: has joined #RubyOnRails
[11:42:07] xco: hi. i have a model. A and B. A belongs to B. in the form creation for A, how do i pass the b_id to the form using a dropdown?
[11:42:11] xco: i have tried something like
[11:42:12] xco: select_tag 'person', options_from_collection_for_select(@people, 'id', 'name')
[11:42:32] xco: but i get “B must exist” validation error
[11:42:47] Cork: person_id?
[11:44:37] mauro1254: has joined #RubyOnRails
[11:44:54] xco: that’s just an example
[11:45:15] xco: unless i don’t know what you mean by “person_id?”
[11:45:51] Cork: when your linking A to be the column is b_id not b
[11:46:07] Cork: so you need to name the select_tag element x_id
[11:48:14] oddie: has joined #RubyOnRails
[11:48:17] xco: i didn’t know that
[11:49:58] xco: Cork: so it’d be something like this?
[11:49:59] xco: <%= select_tag 'b_id', options_from_collection_for_select(@lot_of_bs, 'id', 'name') %>
[11:50:24] xco: still same validation error
[11:50:50] Cork: make sure you let it through the permit() in the controller
[11:51:47] xco: yup. it’s already permitted
[11:53:04] Cork: and the value you see in the params is actually what you selected in the dropdown?
[11:54:38] xco: in the dropdown i see the names of the models which are just string attribs
[11:54:58] Cork: and no id="" attribute?
[11:55:31] xco: please let me check that
[11:57:03] akosednar: has joined #RubyOnRails
[11:57:55] xco: Cork: actually the param for B is no gone completely
[11:58:05] uksio: has joined #RubyOnRails
[11:58:11] xco: that’s why it’s ssaying “B must exist”
[11:58:25] Cork: xco: you shouldn't have a param for B
[11:58:35] Cork: at least if you plan to select it from a dropdown
[11:58:54] xco: that’s what i want to achieve; selecting it from the dropdown
[11:59:04] xco: with that the param shouldn’t be sent for B?
[11:59:21] xco: then how do i send the b_id through the form?
[11:59:45] xco: i’m using exactly this
[11:59:46] xco: <%= select_tag 'b_id', options_from_collection_for_select(@lot_of_bs, 'id', 'name') %>
[12:00:58] Cork: xco: well, "B must exist" is a model validator so you have to make sure you permit :b_id in the controller
[12:02:18] Cork: also note that if you normally use f.text_field you want to do the same here
[12:02:44] Cork: (meaning f.select instead of select_tag)
[12:07:25] xco: I believe you mean using this select https://apidock.com/rails/ActionView/Helpers/FormOptionsHelper/select
[12:07:29] xco: Cork: right?
[12:07:44] Cork: depending on how you build your forms, ya
[12:10:12] xco: thanks… :)
[12:19:58] dionysus69: has joined #RubyOnRails
[12:24:57] DTZUZO: has joined #RubyOnRails
[12:41:08] ArTiSTiX: has joined #RubyOnRails
[13:02:42] srinidhi: has joined #RubyOnRails
[13:19:27] galancito: has joined #RubyOnRails
[13:21:14] galancito: Hi, has someone tried to use Rails.application.credentials and placing this on datababase.yml? I have done this and my application just crash. Any idea?
[13:22:53] galancito: Example on here: https://dpaste.de/qEho
[13:23:41] galancito: "/usr/local/bundle/gems/mysql2-0.4.9/lib/mysql2/client.rb:89:in `connect': Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2) (Mysql2::Error)"
[13:32:44] dionysus69: has joined #RubyOnRails
[13:34:43] galancito: I am using Rails 5.2.3
[13:39:32] planigan: has joined #RubyOnRails
[13:46:14] fmccann: has joined #RubyOnRails
[13:50:02] DTZUZO: has joined #RubyOnRails
[14:19:47] galancito: Never mind, the problem come from docker environment vars.
[14:19:54] galancito: Everything is ok.
[14:20:03] galancito: Self correction.
[14:23:33] Dr_MDMA_MD: has joined #RubyOnRails
[14:26:29] ZAJDAN: has joined #RubyOnRails
[14:27:36] ZAJDAN: do You recommend some gems for blogs with connection to social media
[14:33:35] duderonomy: has joined #RubyOnRails
[14:51:16] duderonomy: has joined #RubyOnRails
[15:16:00] gambl0r3: has joined #RubyOnRails
[15:20:56] DTZUZO: has joined #RubyOnRails
[15:27:49] bruce_lee: has joined #RubyOnRails
[15:28:24] tsujp: has joined #RubyOnRails
[15:29:45] davidh38: has joined #RubyOnRails
[15:34:28] davidh38: has joined #RubyOnRails
[15:35:58] Scient: has joined #RubyOnRails
[15:38:19] atrius: has joined #RubyOnRails
[15:38:52] noodle: has joined #RubyOnRails
[15:45:03] gambl0r3: has joined #RubyOnRails
[16:00:35] gambl0r3: has joined #RubyOnRails
[16:09:08] MrCrackPot: hey i have two facebook apps one for one country and another for another. they use omniauth sign in. due to the application using two facebook accounts im thinking to have two callbacks 1_facebook and 2_facebook the problem i can see is devise uses config.omniauth :facebook, 'APP_ID', 'APP_SECRET' ++. can i also change this to facebook_1 and facebook_2
[16:10:44] davidh38: has joined #RubyOnRails
[16:12:17] gambl0r3: has joined #RubyOnRails
[16:22:37] MrCrackPot: https://github.com/plataformatec/devise/blob/master/lib/devise/omniauth/config.rb
[16:23:57] MrCrackPot: i think that is the code used to i think changing the provider in config.omniauth to :1_facebook should work as long as i also pass that to the callback but im thinking im going to need a reroute either in the action and not in the caller so have a paramater in the user link to the action
[16:24:04] MrCrackPot: thoughts anyone
[16:30:08] psilly0: has joined #RubyOnRails
[16:45:07] ravenousmoose: has joined #RubyOnRails
[16:45:36] davidh38: has joined #RubyOnRails
[16:52:49] duderonomy: has joined #RubyOnRails
[16:58:31] nate-^: has joined #RubyOnRails
[16:59:59] nate-^: has left #RubyOnRails: ()
[17:00:05] nate-^: has joined #RubyOnRails
[17:03:18] davidh38: has joined #RubyOnRails
[17:04:00] nate-^: I have a question about factorybot/factorygirl.. if I have a whole set of associations going on that go user->order_items->video_license->video should I be defining them in individual factories/[model].rb or should I be doing this in one single factory? it seems like significant britleness if I do this across multiple files
[17:04:13] tdy: has joined #RubyOnRails
[17:14:11] defsdoor: has joined #RubyOnRails
[17:20:20] davidh38: has joined #RubyOnRails
[17:27:52] rabbit0: has joined #RubyOnRails
[17:35:21] gambl0re: has joined #RubyOnRails
[17:38:52] quazimodo: has joined #RubyOnRails
[17:42:14] davidh38: has joined #RubyOnRails
[17:44:36] Exuma: has joined #RubyOnRails
[17:45:47] gambl0re: has joined #RubyOnRails
[17:46:44] schneider: has joined #RubyOnRails
[17:47:38] Ven``: has joined #RubyOnRails
[17:53:20] srinidhi: has joined #RubyOnRails
[17:56:29] alan_w: has joined #RubyOnRails
[18:00:26] MrCrackPot: nate-^, you could do in one or individual depends how many other models use it
[18:08:34] MrCrackPot: it should auto create your factories when you make a model which would create individual factories but you dont need to use them
[18:08:54] mikecmpbll: has joined #RubyOnRails
[18:11:47] nate-^: has joined #RubyOnRails
[18:14:32] nate-^: has joined #RubyOnRails
[18:17:18] nate-^: has joined #RubyOnRails
[18:20:04] nate-^: has joined #RubyOnRails
[18:24:27] s00pcan: has joined #RubyOnRails
[18:43:18] Exuma: has joined #RubyOnRails
[18:54:17] Ven``: has joined #RubyOnRails
[18:57:20] ellcs: has joined #RubyOnRails
[18:59:29] ellcs: has joined #RubyOnRails
[19:04:14] SteenJobs: has joined #RubyOnRails
[19:18:13] nate-^: has joined #RubyOnRails
[19:20:36] davidh38: has joined #RubyOnRails
[19:22:14] tdy: has joined #RubyOnRails
[19:27:37] lankanmon: has joined #RubyOnRails
[19:31:03] sameerynho: has joined #RubyOnRails
[19:33:37] givemeaname: has joined #RubyOnRails
[19:37:13] givemeaname: hello, today i got this error uninitialized constant ActionDispatch::Routing::RouteSet::Mapper (NameError)Did you mean? ActionDispatch::Routing::Mapper
[19:37:37] givemeaname: can anyone explain to me
[19:41:28] dionysus70: has joined #RubyOnRails
[20:20:17] dionysus69: has joined #RubyOnRails
[20:21:01] arielserafini: has joined #RubyOnRails
[20:32:06] ellcs: has joined #RubyOnRails
[20:32:11] s00pcan: has joined #RubyOnRails
[20:51:31] AzaToth: has joined #RubyOnRails
[20:53:35] AzaToth: has left #RubyOnRails: ()
[21:16:17] Exuma: has joined #RubyOnRails
[21:19:24] mikecmpb_: has joined #RubyOnRails
[21:23:13] runs: has joined #RubyOnRails
[21:35:41] s00pcan: has joined #RubyOnRails
[21:41:06] mikecmpbll: has joined #RubyOnRails
[21:44:36] xco: has joined #RubyOnRails
[21:50:47] Exuma: has joined #RubyOnRails
[22:01:00] davidh38: has joined #RubyOnRails
[22:17:10] noodle: has joined #RubyOnRails
[22:23:18] davidh38: has joined #RubyOnRails
[22:29:58] sameerynho: has joined #RubyOnRails
[22:54:39] davidh38: has joined #RubyOnRails
[22:55:03] tdy: has joined #RubyOnRails
[22:55:43] runs: As quit as i came, as quit as it is, as quit as i'll leave Adios
[22:56:19] runs: has left #RubyOnRails: ("WeeChat 2.5")
[22:56:35] xco_: has joined #RubyOnRails
[23:08:09] defsdoor: has joined #RubyOnRails
[23:30:25] Intelo: has joined #RubyOnRails
[23:33:59] ur5us: has joined #RubyOnRails