y, i´ve already updated the item model with Callbacks, the controller code was becoming ugly
http://api.rubyonrails.org/classes/ActiveRecord/Dirty.html seems to do the job http://railscasts.com/episodes/109-tracking-attribute-changes seems also a good explanation, but i cant listen here, in a library, with no phones i think its solved thx On 28 Maio, 16:13, JL Smith <autige...@gmail.com> wrote: > First, get familiar with model callbacks if you're not already because > you don't want to put this logic in the controller: > > http://guides.rails.info/activerecord_validations_callbacks.html#call... > > Then check out the dirty object feature that ActiveRecord provides and > how to use it: > > http://api.rubyonrails.org/classes/ActiveRecord/Dirty.htmlhttp://railscasts.com/episodes/109-tracking-attribute-changes > > With that said, I'd probably write an "after_update" callback on > whatever model you're using and interrogate that object with what > "model.changed". --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---