« Back to channel list

#RubyOnRails - 29 July 2018

« Back 1 day Forward 1 day »
[00:19:25] apeiros: has joined #RubyOnRails
[00:28:19] Technodrome: has joined #RubyOnRails
[00:32:48] scrptktty: has joined #RubyOnRails
[00:38:52] easzero: has joined #RubyOnRails
[00:42:04] wwalker: Ignore that question. I figured out how to create the check boxes so that they come in as an array instead of a hash.
[00:43:00] wwalker: Anyone got a pointer on which user auth system to use if I only have an admin account, no user accounts.
[00:46:00] Caerus: devise is very configurable
[00:47:10] wwalker: I am looking for dead simple. I haven't written any Rails in a couple of years.
[00:47:37] wwalker: I remember using devise on a project about 5 years ago
[00:48:35] wwalker: Caerus: thanks
[00:49:27] alfiemax: has joined #RubyOnRails
[01:34:44] tdy: has joined #RubyOnRails
[01:47:05] tdy: has joined #RubyOnRails
[01:50:44] akaiiro: has joined #RubyOnRails
[02:32:04] Caerus: has joined #RubyOnRails
[02:41:45] sevenseacat: has joined #RubyOnRails
[02:47:32] skryking: has joined #RubyOnRails
[03:10:07] braincrash: has joined #RubyOnRails
[03:13:30] akaiiro: has joined #RubyOnRails
[03:15:08] za1b1tsu: has joined #RubyOnRails
[03:19:20] Technodrome: has joined #RubyOnRails
[03:39:09] akaiiro: has joined #RubyOnRails
[03:41:03] moei: has joined #RubyOnRails
[04:25:18] duderonomy: has joined #RubyOnRails
[04:42:17] desnudopenguino: i'm working on a rails app with vue and webpacker, and i've run into a bit of an issue testing out a production deployment. I'm getting a CSP warning. I precompiled the assets and everything. anyone have any suggestions?
[05:16:55] tdy: has joined #RubyOnRails
[05:18:31] Saukk: has joined #RubyOnRails
[05:41:24] conta: has joined #RubyOnRails
[06:03:52] andrew9184: has joined #RubyOnRails
[06:05:09] psychoslave: has joined #RubyOnRails
[06:18:50] yottanami: has joined #RubyOnRails
[06:20:52] yottanami: I have a project on a docker and trying to access it using nginx as proxy. the problem is the header in docker is 127.0.0.1:3020 but I access it using a domain
[06:21:21] yottanami: so I got this error HTTP Origin header (http://mydomain.com )didn't match request.base_url (http://127.0.0.1:3010)
[06:21:31] yottanami: ActionController::InvalidAuthenticityToken (ActionController::InvalidAuthenticityToken)
[06:21:33] Tempesta: has joined #RubyOnRails
[06:21:59] yottanami: I also tried to use `protect_from_forgery with: :null_session` but I got error yet, how can I fix it?
[06:25:24] alfiemax: has joined #RubyOnRails
[06:44:35] newton: has joined #RubyOnRails
[07:22:36] andrew9184: has joined #RubyOnRails
[07:37:13] reber: has joined #RubyOnRails
[07:37:29] beilabs: has joined #RubyOnRails
[07:59:10] beilabs: has joined #RubyOnRails
[08:02:25] wethu: has joined #RubyOnRails
[08:44:40] lxsameer: has joined #RubyOnRails
[08:54:47] ShekharReddy: has joined #RubyOnRails
[09:05:22] beilabs: has joined #RubyOnRails
[09:20:06] wethu: has joined #RubyOnRails
[09:23:17] conta: has joined #RubyOnRails
[09:36:55] wethu: has joined #RubyOnRails
[09:37:27] beilabs: has joined #RubyOnRails
[09:42:51] beilabs: has joined #RubyOnRails
[10:22:57] unreal: has joined #RubyOnRails
[10:37:28] FernandoBasso: has joined #RubyOnRails
[10:40:23] FernandoBasso: has joined #RubyOnRails
[10:49:56] lexileo: has joined #RubyOnRails
[11:02:53] beilabs: has joined #RubyOnRails
[11:11:44] wethu: has joined #RubyOnRails
[11:12:27] ciro: has joined #RubyOnRails
[11:28:10] conta: has joined #RubyOnRails
[11:38:57] FernandoBasso: has joined #RubyOnRails
[11:53:25] Sylario: has joined #RubyOnRails
[12:08:32] FernandoBasso: has joined #RubyOnRails
[13:25:57] _aeris_: has joined #RubyOnRails
[13:35:06] ciro: has joined #RubyOnRails
[13:43:41] uksio: has joined #RubyOnRails
[13:44:00] Exagone313: has joined #RubyOnRails
[14:05:44] argoneus: has joined #RubyOnRails
[14:09:02] Technodrome: has joined #RubyOnRails
[14:17:02] GodFather: has joined #RubyOnRails
[14:19:04] srinidhi: has joined #RubyOnRails
[14:21:12] argoneus: has joined #RubyOnRails
[14:26:18] FernandoBasso: has joined #RubyOnRails
[14:35:19] KeyJoo: has joined #RubyOnRails
[14:36:17] snickers: has joined #RubyOnRails
[14:47:26] mikecmpbll: has joined #RubyOnRails
[15:12:35] conta: has joined #RubyOnRails
[15:28:12] ciro: has joined #RubyOnRails
[15:28:13] Dimik: has joined #RubyOnRails
[16:16:56] akaiiro: has joined #RubyOnRails
[16:34:23] za1b1tsu: has joined #RubyOnRails
[16:43:42] beilabs: has joined #RubyOnRails
[17:14:56] wwalker: I have a model which may have a sponsor_id and may have a company_id, but neither one is mandatory, and it cannot be both. But it appears that having 'belongs_to :sponsor' and 'belongs_to :company' makes both ids mandatory to save. How can I work around this?
[17:17:55] wwalker: found it on stack overflow. optional: true Doh
[17:40:24] padung: any good guideline for refactoring rails code ?
[17:43:08] akaiiro: has joined #RubyOnRails
[17:44:44] scrptktty: has joined #RubyOnRails
[17:44:44] ciro: wwalker: belongs_to :sponsor, optional: true
[17:45:35] ciro: ahh, you found it in stack overflow... well, that's ok
[17:59:02] Technodrome: has joined #RubyOnRails
[18:04:53] dviola: has joined #RubyOnRails
[19:03:14] wwalker: thanks ciro
[19:03:58] ciro: wwalker: you're welcome
[19:26:14] sirensari2: has joined #RubyOnRails
[19:26:37] FrostCandy: has joined #RubyOnRails
[19:27:28] FrostCandy: What happens when you say if variable? , does that check to see if the variable exists? I can't find a def variable? method anywhere so it must be built in to ruby?
[19:28:08] FrostCandy: if variable? is just a boolean true false check ?
[19:33:35] IanMalcolm: has joined #RubyOnRails
[19:38:04] fryguy: sligthly more complicated than true/false, but yes
[19:38:13] fryguy: it does not check if it's defined, strictly speaking
[19:38:15] duderonomy: has joined #RubyOnRails
[19:39:08] ciro: FrostCandy: "if variable" checks if the already defined identifier "variable" is different than "nil" or "false". In that case, the expression is "true", and "false" otherwise.
[19:40:12] ciro: FrostCandy: if the identifier "variable" has not been defined or is not visible in the current scope, an NameError exception is triggered
[19:41:35] ciro: it is built into ruby, because identifiers and value assigning is a primary core function of the interpreter
[19:42:03] FrostCandy: ciro: thanks
[19:42:09] ciro: you're welcome
[19:46:52] mroutis: has joined #RubyOnRails
[19:48:21] IanMalcolm: has joined #RubyOnRails
[20:02:23] duderonomy: has joined #RubyOnRails
[20:09:24] tdy: has joined #RubyOnRails
[20:10:22] wwalker: I added this to routes: get 'booths/:id/disown', to: 'booths#disown' how can I make it generate a "disown_booth_path" ? I of course can do it manually, but I'd like to use a simple link_to
[20:16:22] mim7: has joined #RubyOnRails
[20:26:33] hightower4: has joined #RubyOnRails
[20:30:28] lexileo: has joined #RubyOnRails
[20:40:14] FernandoBasso: has joined #RubyOnRails
[20:42:17] fryguy: wwalker: try to add `as: disown_booth` to the route definition
[20:42:46] wwalker: fryguy: thank you!
[20:42:59] fryguy: or, if you are doing restful routing, add your definition to the restful route instead of it being standalone
[20:43:49] fryguy: `resources :booths { member { get :disown } }` might name the route that too
[20:46:19] fryguy: also, i'm just guessing, but this route should probably be a post and not a get
[20:51:21] wwalker: I'll try the resources change. But right now, my "render :disown" says "Missing template booths/disown...." but I have a disown.html.erb, in app/views/booths.
[21:59:02] ur5us: has joined #RubyOnRails
[22:02:03] Radar: GOOD MORNING
[22:03:01] Radar: wwalker: was the missing template for a different format perhaps?
[22:10:20] crankharder: has joined #RubyOnRails
[22:15:08] IanMalcolm: has joined #RubyOnRails
[22:29:05] beilabs: has joined #RubyOnRails
[23:10:35] wethu: has joined #RubyOnRails
[23:13:03] wwalker: Radar: nope. I just gave up and redirected it to a mostly reasonable page
[23:14:24] wwalker: Now I am getting the same thing with: format.csv { send_data @sponsors.to_csv } "SponsorsController#index is missing a template for this request format and variant. request.formats: ["text/csv"] request.variant: []
[23:14:53] wwalker: I'm generating all the text, why does it want a template?
[23:22:25] mroutis: has joined #RubyOnRails
[23:32:48] segy: has joined #RubyOnRails
[23:48:43] Radar: wwalker: are you sure it is hitting that format.csv block?