3 ms·
FYI, here's what's new specifically for ActiveRecord 4, relevant for those of us who are using other frameworks (Sinatra, Padrino) that leverage Rails component
by danso 14y ago
FYI, here's what's new specifically for ActiveRecord 4, relevant for those of us who are using other frameworks (Sinatra, Padrino) that leverage Rails components:
http://blog.remarkablelabs.com/2012/12/what-s-new-in-active-record-rails-4-countdown-to-2013 http://blog.remarkablelabs.com/2012/12/what-s-new-in-active-...
The official edgenotes has sections for all the Active components:
http://edgeguides.rubyonrails.org/4_0_release_notes.html http://edgeguides.rubyonrails.org/4_0_release_notes.html
- mgkimsal 14y agoWhy are the dynamic finders being deprecated? Is it a speed/parsing thing? Or changing styles?
- danso 14y agoI had that question too...I was thinking that it must have some effect on performance but I thought it would be pretty minuscule?
- mgkimsal 14y agoOT performance rumination: I've not run tests on Rails' performance in this capacity, but I've always thought that the runtime gymnastics to pluralize model names would be a big drag on Rails performance. I'm guessing something's cached, but I've never understood the 'opinion' that a class should be 'Person' and the table name should be 'people'.
- lobster_johnson 14y agoChanging styles is my guess; less a reliance on auto-generated magic. There is nothing wrong with this: find_all_by_user_id_and_conversation_id(params[:user_id], @conversation.id) But this is equally (actually more) concise: where(user_id: params[:user_id], conversation_id: @conversation.id) ...and it builds on the composable scope system (derived from ARel).