[LRUG] Controlling the order in which update_attributes processes the attributes

Tom Stuart tom at experthuman.com
Sat Aug 18 03:00:38 PDT 2007


On 18 Aug 2007, at 08:57, John Winters wrote:
> Is there any way of controlling the order in which update_attributes
> processes the attributes in a browser request?

update_attributes takes a hash argument, so the keys will be in an  
arbitrary ("random") order. It's unlikely that you really want to  
override it -- perhaps you want to use a callback (http:// 
api.rubyonrails.org/classes/ActiveRecord/Callbacks.html) to perform  
your post-processing of the attribute values?

Cheers,
-Tom




More information about the Chat mailing list