#RubyOnRails - 13 March 2018
« Back 1 day Forward 1 day »
[00:51:24] adavia: Isnt this correct to set a default value? Image.create!(params.permit(:file, :imageable_type => "Book"))
[01:36:29] javierbuilder: hi, i need help for one app that i building.. https://www.pastiebin.com/5aa6a8bd95502
[10:36:09] _sfiguser: hello all, can somebody suggest me a good starting point for beginners who want to start with RoR ?
[10:56:47] sevenseacat: yeah a bit out of date. we don't have a really good intro to rails atm, but I'm working on that
[10:58:53] sevenseacat: if you're new to programming in general, I'd recommend Chris Pine's Learn to Program. if you're not new to programming but don't know Ruby, David A Black's The Well Grounded Rubyist
[12:40:44] mrbubbles: I want to have the ability to show users messages if needed - so a popup saying "a new file has arrived". I was thinking of just having a messages table which messages get added to and then a ajax call on the front end that queries it every 5 seconds and displays messages if any exist. Does that sound sensible?
[12:41:08] mrbubbles: I wasn't sure if something like ActionCable was more suitable (I'm a bit confused by/scared of ActionCable)
[12:43:23] tbuehlmann: mrbubbles: sure, you could use actioncable for this, it's a pretty good usecase for it. you could also do what you mentioned, polling. another option is to use server sent events.
[17:14:32] remix2000: Hiya! Have you experienced problems with HTTPS when using the latest Puma? I got all those errors mentioned in https://git.io/vxUQL
[18:29:22] cagomez: how do I write a stub activemodel attribute "setter" for an attribute? is it `def my_attribute=; # do stuff end;`?
[18:30:11] cagomez: tbuehlmann: I'm not ready to write a migration to add the column yet because I want to think about the data model first
[18:31:07] cagomez: ie how do I write a method that will "intercept" `MyModel.update(my_attribute: 'foo')`? would it be the same as above?
[20:04:11] cagomez: Bar belongs to Foo. Foo has many Bars. should I use the inverse_of option on Bar?
[20:55:34] molloy: nme13: what are your specific questions? it really helps us help you if you tell us what you are having a problem with, and what your initially attempted solution is ^_^
[20:57:28] molloy: it helps to understand what perspective you are approaching the problem from, and what best practices you may not have learned about before constructing that approach
[20:59:48] nme13: but I don't know how to automatically create the model and the migration when it gets installed ine rails client app
[21:00:00] helpa: nme13: http://guides.rubyonrails.org/engines.html - Engines Guide - Written by Ryan Bigg
[21:21:12] FrostCandy: I'm not sure this could ever happen, but if someone were to call one of my webpages I can read the url they used with request.original_url, but how do i read the headers if any?
[21:36:14] daveomcd: I have some strong_params in my controllers that are quite large. This seems like "smelly" code but I'm not sure what I should probably consider doing - or if it's fine. Anyone have any ideas? https://gist.github.com/daveomcd/4bca2686cff21b8ddf93011dc433c4e8
[22:19:46] rikkipitt: hey folks, anyone know much about activestorage? I'm making a custom service and was wondering how i could override the preview feature for a particular service (i.e. a service that generates remote preview images)