#RubyOnRails - 04 March 2018
« Back 1 day Forward 1 day »
[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 ?
[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?
[11:39:51] tbuehlmann: desperek: either `that_one.manies << some_many` or directly via Many.create(one: that_one)
[16:36:41] desperek: dminuoso, eh, its kinda confusing when you are integer rather than boolean in your database
[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
[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: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: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: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: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:58] fryguy: sameerynho: and what do you want the user to do/see while you are waiting for the response?
[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: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: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:41:32] Radar: HappyHotDog: https://gist.github.com/upRos3/b0d5e2e9840d1c0139e031c097d46b12#file-rails_helper-rb-L12-L17
[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: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.
[23:00:34] Radar: This post has the following code for contact_spec.rb: https://gist.github.com/radar/575212d34950140ca47314a263c409ae
[23:03:02] Radar: Seems like you changed it in this commit: https://github.com/upRos3/Rspec_intro/commit/7c243edc8cf20784f3cb34fa10a0187047b93b29