#RubyOnRails - 15 July 2017
« Back 1 day Forward 1 day »
[01:29:03] rubycoder37: I would like to move some of the methods I have in my User model to the Store model, but I'm not sure how to access them in the controller, should I make them class methods or use scopes? https://gist.github.com/anonymous/914db4604a31e50b8f294fb5df0d9267
[01:29:19] rubycoder37: if you have any suggestions about how to improve my code further, please let me know
[12:03:29] ule: rubycoder37: Store.count in that situation could throw an exception if it's return is zero
[12:18:04] [SpLaT]: I have a form with two sets of two radio buttons. The first two have a value of 1 and 2, the second have a value of 3 and 4. The form data posts fine, and I can access it via the controller, but how can I re-route them to '/values/:first/:second/' (i.e. /values/1/3). I've tried redirect_to '/values/' + params['first'] + '/' + params['second'] + '/', but that fails.
[17:24:44] gheegh: Question. I am using the Cequel gem to write data to Cassandra. It doesn't implement the after_commit hook (it does other after_x models though). I'm wondering if there is a better way to do this than trying to create a new after_commit hook for the Cequel gem.. anyone have thoughts?
[19:39:57] ar1a: hmm, i need some projects to do to familiarize myself with rails a bit more, try and improve my confidence. any ideas friends?
[19:56:21] cam27: I was just going to say for me, I tried diving into Ruby on Rails, but then ended up reading “The Well Grounded Rubyist” to learn Ruby and then the Guides. Once I had a slightly solid understanding of Ruby and Rails, then it was a lot easier to develop. But I probably do more research than developing, cause I’m trying to put togetther a great work flow.
[21:46:20] kitsuneyo: is there a reason not to use default sort on models? i seem to remember reading about some issue