« Back to channel list

#RubyOnRails - 04 March 2018

« Back 1 day Forward 1 day »
[00:05:15] HappyHotDog: nm, sorted it
[00:16:24] jackhum_: has joined #RubyOnRails
[00:43:02] hahuang61: has joined #RubyOnRails
[00:53:58] workmad3: has joined #RubyOnRails
[01:08:55] ResidentBiscuit: has joined #RubyOnRails
[01:09:59] PresidentBiscuit: has joined #RubyOnRails
[01:12:27] JaredR: has joined #RubyOnRails
[01:14:26] hahuang61: has joined #RubyOnRails
[01:32:20] am55: has joined #RubyOnRails
[01:33:51] daveomcd: has joined #RubyOnRails
[01:34:11] apparition: has joined #RubyOnRails
[01:35:22] daveomcd: when I'm doing my strong params in my controller. what constitues a parameter being added? Is it parameters that I'm either using in the controller or those in which I want to add/update on the record for actions #create, #update ?
[01:43:56] dviola: has joined #RubyOnRails
[01:56:58] Puffball: has joined #RubyOnRails
[02:43:34] hahuang61: has joined #RubyOnRails
[02:47:57] am55: has joined #RubyOnRails
[02:57:35] elcontrastador: has joined #RubyOnRails
[03:05:46] armyriad: has joined #RubyOnRails
[03:15:28] aguestuser: has joined #RubyOnRails
[03:35:13] hahuang61: has joined #RubyOnRails
[03:45:54] Puffball: has joined #RubyOnRails
[04:02:59] armyriad: has joined #RubyOnRails
[04:24:00] psmolen: has joined #RubyOnRails
[04:25:14] trautwein: has joined #RubyOnRails
[04:32:31] psmolen: has joined #RubyOnRails
[04:38:09] hahuang61: has joined #RubyOnRails
[04:52:00] jackhum_: has joined #RubyOnRails
[04:55:21] workmad3: has joined #RubyOnRails
[05:11:40] AnotherOne: has joined #RubyOnRails
[05:16:21] hahuang61: has joined #RubyOnRails
[05:50:23] srinidhi: has joined #RubyOnRails
[06:32:42] moei: has joined #RubyOnRails
[06:35:00] moei: has joined #RubyOnRails
[06:40:36] mtkd: has joined #RubyOnRails
[06:56:03] workmad3: has joined #RubyOnRails
[07:00:47] dionysus69: has joined #RubyOnRails
[07:04:39] jackhum_: has joined #RubyOnRails
[07:18:57] srinidhi: has joined #RubyOnRails
[07:24:07] elcontrastador: Just learning about engines. My reading skipped a fundamental question that I have that seems easily answered. Can the engine run completely autonomously? Is it created inside or outside of the main rails application directory?
[07:35:43] hahuang61: has joined #RubyOnRails
[07:42:47] orbyt_: has joined #RubyOnRails
[07:43:56] fragamus: has joined #RubyOnRails
[07:55:11] apparition: has joined #RubyOnRails
[08:03:11] Saukk: has joined #RubyOnRails
[08:13:06] dionysus69: has joined #RubyOnRails
[08:43:14] hahuang61: has joined #RubyOnRails
[08:51:30] MrCrackPotBuilde: has joined #RubyOnRails
[08:55:51] armyriad: has joined #RubyOnRails
[08:56:46] workmad3: has joined #RubyOnRails
[09:04:54] mtkd: has joined #RubyOnRails
[09:05:09] tpendragon: has joined #RubyOnRails
[09:16:07] hahuang61: has joined #RubyOnRails
[09:21:45] desperek: has joined #RubyOnRails
[09:23:31] quazimodo: has joined #RubyOnRails
[09:55:08] mtkd: has joined #RubyOnRails
[09:57:13] marr: has joined #RubyOnRails
[10:05:06] schneider: has joined #RubyOnRails
[10:14:42] mjolnird: has joined #RubyOnRails
[10:16:43] dionysus69: has joined #RubyOnRails
[10:19:20] mtkd: has joined #RubyOnRails
[10:20:00] pLaTo0n: has joined #RubyOnRails
[10:20:03] sidx64: has joined #RubyOnRails
[10:26:00] ^mtkd: has joined #RubyOnRails
[10:27:57] mtkd: has joined #RubyOnRails
[10:36:52] ^mtkd: has joined #RubyOnRails
[10:37:11] hahuang61: has joined #RubyOnRails
[10:38:01] mtkd: has joined #RubyOnRails
[10:47:36] one_zero: has joined #RubyOnRails
[10:56:21] am55: has joined #RubyOnRails
[10:57:31] workmad3: has joined #RubyOnRails
[11:32:02] sameerynho: has joined #RubyOnRails
[11:32:31] desperek: how can i append to one-to-many relation?
[11:39:51] tbuehlmann: desperek: either `that_one.manies << some_many` or directly via Many.create(one: that_one)
[11:43:22] hahuang61: has joined #RubyOnRails
[11:47:20] sidx64_: has joined #RubyOnRails
[11:53:20] desperek: okay, thanksies tbuehlmann
[12:03:35] schneider: has joined #RubyOnRails
[12:14:10] defsdoor: has joined #RubyOnRails
[12:24:54] durango: has joined #RubyOnRails
[12:32:24] AzaToth: has joined #RubyOnRails
[12:34:51] hahuang61: has joined #RubyOnRails
[12:38:37] DrYockel1: has joined #RubyOnRails
[12:40:15] schneider: has joined #RubyOnRails
[12:58:11] workmad3: has joined #RubyOnRails
[13:08:41] desperek: hi, can i chain things like
[13:08:49] desperek: something.(hello.there)?
[13:09:06] desperek: so it's taking hello.there attr from something?
[13:10:53] schneider: has joined #RubyOnRails
[13:15:42] hahuang61: has joined #RubyOnRails
[13:16:38] am55: has joined #RubyOnRails
[13:18:48] conta: has joined #RubyOnRails
[13:18:54] dionysus69: has joined #RubyOnRails
[13:33:59] desperek: can you use where or find_by on association?
[13:45:21] desperek: how do i avoid these undefined method `blabla' for nil:NilClass
[13:45:36] desperek: ruby style rather than php style
[13:46:33] desperek: whew this is depressing
[13:59:42] Fusselgesicht: has joined #RubyOnRails
[14:01:22] loyaqua: has joined #RubyOnRails
[14:10:55] hndk: has joined #RubyOnRails
[14:17:49] desperek: anyone using pundit?
[14:18:05] desperek: when i add user_not_authorized policy undefined appears
[14:38:02] hahuang61: has joined #RubyOnRails
[15:03:55] Saukk: has joined #RubyOnRails
[15:04:55] schneider: has joined #RubyOnRails
[15:19:50] maesitos: has joined #RubyOnRails
[15:20:09] maesitos: Hello could anybody help me monkeypatching 'render' from a controller?
[15:21:48] maesitos: I have this https://pastebin.com/raw/ZfGpAGFt
[15:22:07] maesitos: but it's breaking the app and I'm not sure why
[15:37:38] hahuang61: has joined #RubyOnRails
[15:41:34] am55: has joined #RubyOnRails
[15:48:58] uksio: has joined #RubyOnRails
[15:57:01] desperek: hi, why does rails migration insert int instead of a boolean?
[16:05:15] antoine1: has joined #RubyOnRails
[16:12:13] Barrt: has joined #RubyOnRails
[16:14:35] blackcross: has joined #RubyOnRails
[16:18:30] jottr: has joined #RubyOnRails
[16:26:02] chouhoulis: has joined #RubyOnRails
[16:34:08] sidx64: has joined #RubyOnRails
[16:36:00] dminuoso: desperek: Please rephrase for your question to make any sense.
[16:36:41] desperek: dminuoso, eh, its kinda confusing when you are integer rather than boolean in your database
[16:37:36] sidx64_: has joined #RubyOnRails
[16:43:29] hahuang61: has joined #RubyOnRails
[16:51:11] ericmathison: has joined #RubyOnRails
[16:51:43] workmad3: has joined #RubyOnRails
[16:57:45] orbyt_: has joined #RubyOnRails
[17:05:06] ResidentBiscuit: has joined #RubyOnRails
[17:07:23] hahuang61: has joined #RubyOnRails
[17:42:45] hahuang61: has joined #RubyOnRails
[17:48:18] Barrt: has joined #RubyOnRails
[18:02:24] helpa: has joined #RubyOnRails
[18:05:38] srinidhi: has joined #RubyOnRails
[18:14:32] hahuang65: has joined #RubyOnRails
[18:34:39] hahuang61: has joined #RubyOnRails
[18:34:51] audiodude: has joined #RubyOnRails
[18:35:48] dviola: has joined #RubyOnRails
[18:45:53] larissa: has joined #RubyOnRails
[18:51:07] audiodude: has left #RubyOnRails: ()
[18:52:44] daveomcd: has joined #RubyOnRails
[18:55:08] am55: has joined #RubyOnRails
[19:08:35] jottr: has joined #RubyOnRails
[19:19:25] hahuang61: has joined #RubyOnRails
[19:22:19] antoine1_: has joined #RubyOnRails
[19:28:00] antoine1: has joined #RubyOnRails
[19:29:41] DTZUZO: has joined #RubyOnRails
[19:36:03] AnotherOne: has joined #RubyOnRails
[19:39:41] MacWinner: has joined #RubyOnRails
[19:45:28] daveomcd: how can I do the follow code for "request.env" in my rails test shown here? https://github.com/omniauth/omniauth/wiki/Integration-Testing#setting-up-the-controller
[19:51:19] fl4sh_: has joined #RubyOnRails
[20:00:39] durango: has joined #RubyOnRails
[20:13:57] schneider: has joined #RubyOnRails
[20:14:37] jnollette: has joined #RubyOnRails
[20:16:56] dtzuzu: has joined #RubyOnRails
[20:18:07] sidx64: has joined #RubyOnRails
[20:26:28] sidx64: has joined #RubyOnRails
[20:40:58] hahuang61: has joined #RubyOnRails
[20:40:58] am55: has joined #RubyOnRails
[20:46:37] fragamus: has joined #RubyOnRails
[20:58:25] jnollette: has joined #RubyOnRails
[21:04:41] Radar: GOOD MORNING
[21:06:42] dminuoso: HALLO RADAR
[21:08:54] caoraivoso: has joined #RubyOnRails
[21:09:17] caoraivoso: Radar: is your caps lock broken?
[21:09:40] dminuoso: caoraivoso: NO HE JUST LIKES CAPS.
[21:10:35] caoraivoso: OK LET'S ALL TYPE IN CAPS
[21:11:38] hahuang61: has joined #RubyOnRails
[21:16:43] caoraivoso: Radar: you remind me of Vanilla Ice
[21:16:53] caoraivoso: https://www.youtube.com/watch?v=rog8ou-ZepE
[21:17:55] dtzuzu: has joined #RubyOnRails
[21:18:27] Radar: caoraivoso: BECAUSE I AM ALWAYS PUSHING IT?
[21:20:00] Radar: Aaaand that was Salt-n-Pepa. Excuse my Monday morning brain.
[21:21:44] jottr: has joined #RubyOnRails
[21:34:07] Dimik: has joined #RubyOnRails
[21:35:23] DTZUZO: has joined #RubyOnRails
[21:47:54] larissa: has joined #RubyOnRails
[21:48:18] durango: has joined #RubyOnRails
[21:52:51] jottr: has joined #RubyOnRails
[21:55:19] twilling: has joined #RubyOnRails
[22:02:15] ElDoggo: has joined #RubyOnRails
[22:07:40] daemonwrangler: has joined #RubyOnRails
[22:17:34] sameerynho: hey folks, any solution for async response in rails ? for example returning a promise or something which resolves to the response ?
[22:20:55] HappyHotDog: anyone here handy with Rspec?
[22:21:08] HappyHotDog: I'm completely baffled on what's going o
[22:21:14] HappyHotDog: with this error
[22:30:37] fryguy: sameerynho: actioncable might be what you are looking for, or sidekiq or resque
[22:30:44] Mkop: has joined #RubyOnRails
[22:31:24] Radar: HappyHotDog: !rule0
[22:31:24] helpa: HappyHotDog: Show rather than tell. Explaining your problem with code, stacktraces or errors is always preferred to explaining it with just text. Show us what's happening, rather than telling us. Put the code on https://gist.github.com and then give us the HTTP link to the Gist.
[22:31:47] Radar: sameerynho: What's the exact problem that an async response would solve?
[22:31:55] Radar: Could you help us understand that a bit more?
[22:32:11] sameerynho: fryguy: actioncable is a ws implementation and sidekiq and resque are for background jobs no async response. but thanks anyway friend
[22:32:39] fryguy: sameerynho: maybe be more specific about what you mean by async response then
[22:33:04] sameerynho: Radar: On each request I write to a kafka topic for a worker cluster. The i have to wait for an specific message on a topic for response
[22:33:35] fryguy: sameerynho: and then what do you do when you get that response?
[22:33:37] sameerynho: I want to make a future/promise or something which resolve to the response as soon as i read from the kafka topic
[22:33:43] HappyHotDog: ok will probably be worth uploading the entire repo
[22:33:45] sameerynho: fryguy: send it to user
[22:33:45] HappyHotDog: but: https://gist.github.com/upRos3/b0d5e2e9840d1c0139e031c097d46b12
[22:33:58] fryguy: sameerynho: and what do you want the user to do/see while you are waiting for the response?
[22:34:07] HappyHotDog: when I run spec on the contact_spec.rb file
[22:34:16] HappyHotDog: it says be_valid is undefined
[22:35:28] sameerynho: fryguy: some spinner
[22:35:55] fryguy: sameerynho: so then the 3 suggestions I gave are appropriate
[22:36:21] sameerynho: fryguy: how do you return data from a sidekiq job to the controller ?
[22:36:24] fryguy: send the response along to sidekiq/resque, send a response immediately to the user, and wait for the background processor to complete
[22:36:36] fryguy: sameerynho: you don't, the response has already been sent back to the user
[22:36:38] sameerynho: fryguy: also i don't want to use actioncable for ws
[22:37:02] Radar: HappyHotDog: Can you show us what's in your Gemfile? Do you have `rspec-rails` or just `rspec`?
[22:37:17] sameerynho: fryguy: hmmm that's the thing, the data that should be in the response is in that kafka topic which i have to wait for it
[22:37:35] HappyHotDog: Radar, rspec_rails
[22:37:52] fryguy: sameerynho: draw it out on a piece of paper, you'll hopefully see your mistake
[22:38:17] HappyHotDog: Radar, https://gist.github.com/upRos3/b0d5e2e9840d1c0139e031c097d46b12
[22:38:42] Radar: HappyHotDog: Seems legit.
[22:38:55] sameerynho: fryguy: hmmm there is no mistake I'm doing the same thing with my other components in diffrent languages, All i have to do is to wait for data to show up in the kafka topic. read it and return it to user
[22:39:01] Radar: HappyHotDog: Weird then that `be_valid` would be around. `rspec-rails` adds that matcher iirc.
[22:39:03] sameerynho: i can use it in sync fashion
[22:39:23] sameerynho: but i don't want to suffer from a resource starvation later
[22:39:24] Radar: HappyHotDog: What's in `rails_helper`?
[22:39:43] hahuang61: has joined #RubyOnRails
[22:39:50] fryguy: sameerynho: then we are missing something
[22:40:09] fryguy: describe how it works in some other system
[22:40:13] sameerynho: can i create a thread in rails ?
[22:40:48] sameerynho: what's the best way to do it
[22:40:52] helpa: "Best" and "better" are subjective. Try to use a different term.
[22:40:57] HappyHotDog: Radar, added it onto the gist
[22:41:32] Radar: HappyHotDog: https://gist.github.com/upRos3/b0d5e2e9840d1c0139e031c097d46b12#file-rails_helper-rb-L12-L17
[22:41:34] Radar: What's this?
[22:41:51] Radar: HappyHotDog: If you comment that out, does `be_valid` work?
[22:41:57] dtzuzu: has joined #RubyOnRails
[22:43:29] HappyHotDog: Radar, no it doesn't and it's a gem that provides on line matchers
[22:43:52] Radar: HappyHotDog: Then I don't know what could be going wrong, sorry :(
[22:43:59] Radar: I would probably need to see the whole application.
[22:54:22] HappyHotDog: Radar, https://github.com/upRos3/Rspec_intro
[22:54:32] Radar: Thanks! I'll clone it and have a poke around.
[22:55:08] HappyHotDog: Awesome, I've literally started learning Rspec today
[22:55:15] HappyHotDog: and this tutorial has been a nightmare
[22:55:19] Radar: Which tutorial?
[22:55:37] HappyHotDog: https://www.sitepoint.com/learn-the-first-best-practices-for-rails-and-rspec/
[22:56:22] HappyHotDog: it's a little dated now I think and realised some of this is happening in the wrong order as files get changed blah blah
[22:56:30] Radar: I don't understand why that tutorial is using shoulda-matchers at all. It doesn't look to me like it uses any of the shoulda-matchers functionality.
[22:56:41] HappyHotDog: but managed to get to that point and I'm stuck
[22:56:51] Radar: Although I only had a quick skim, so I might've missed the line where it uses it.
[22:57:12] HappyHotDog: well any help at all will be appreciated!
[22:57:59] Radar: HappyHotDog: Sure. I reckon I can fix this :) Can you add the exact error to the Gist? I'd like to compare the error that I get here.
[22:59:02] am55: has joined #RubyOnRails
[23:00:34] Radar: This post has the following code for contact_spec.rb: https://gist.github.com/radar/575212d34950140ca47314a263c409ae
[23:00:48] Radar: That's a lowercase C in the expect brackets
[23:00:56] Radar: But even then, the variable `contact` isn't defined anywhere.
[23:01:01] Radar: [09:55:15] <HappyHotDog> and this tutorial has been a nightmare <- agree
[23:01:17] HappyHotDog: oh no, I my computer crashed and I guess it didn't save
[23:01:21] HappyHotDog: I did try it with the C
[23:01:42] Radar: Would you like to try a different tutorial?
[23:02:30] HappyHotDog: it's weird the repo is giving it a small C
[23:02:40] HappyHotDog: it's a capital on mine
[23:02:45] HappyHotDog: and yea sure I guess!
[23:03:01] Damin[m]: has joined #RubyOnRails
[23:03:02] Radar: Seems like you changed it in this commit: https://github.com/upRos3/Rspec_intro/commit/7c243edc8cf20784f3cb34fa10a0187047b93b29
[23:03:09] Radar: Ok. I'll DM you.
[23:03:48] fragamus: has joined #RubyOnRails
[23:04:49] quazimodo: has joined #RubyOnRails
[23:04:49] quazimod1: has joined #RubyOnRails
[23:05:52] quazimodo: has joined #RubyOnRails
[23:15:26] DTZUZO: has joined #RubyOnRails
[23:18:27] mtkd: has joined #RubyOnRails
[23:35:04] hahuang61: has joined #RubyOnRails
[23:38:26] am55: has joined #RubyOnRails
[23:56:12] ResidentBiscuit: has joined #RubyOnRails
[23:59:55] Barrt: has joined #RubyOnRails