On Sat, Apr 7, 2012 at 4:09 AM, Rodrigo Rosenfeld Rosas <[email protected]> wrote: > Okay, I see that you don't share the same feelings I have about this. No > problem. Usually I'd want my overridden method to notice any change to those > values and I find annoying have to write code like this in my controller: > > [:deleted, :disabled].each{|p| model.send :"#{p}=", params[p] == 'true' }
model.update_attributes(params.slice(:deleted, :disabled)). And let your model handle the conversion of attribute values. Robert Pankowecki -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/rubyonrails-core?hl=en.
