4 ms·
I just posted another technique for DRYing up variable initialization in rails controllers: http://www.flyingmachinestudios.com/2008/09/06/dry-up-controllers-wi
by nonrecursive 18y ago
I just posted another technique for DRYing up variable initialization in rails controllers: http://www.flyingmachinestudios.com/2008/09/06/dry-up-controllers-with-params_to_objects/ http://www.flyingmachinestudios.com/2008/09/06/dry-up-contro...
The method I used doesn't let you use method names instead of instance variables, but then again I think it's actually better to use instance variables. In my code I mostly use instance variables for active record objects, whereas I use methods galore. The little @ thus helps me find the active record objects quicker.