On Jul 5, 7:12 pm, Owain <[email protected]> wrote: > I am not sure I am thinking about this the correct way. I have a > admin/maintenance scaffold to amend live data and I need to track the > changes to data related to an order. e.g. change of address. I have > a order_transaction model which I would like to record all of the data > changes through the admin maintenance. I was hoping to use the AR > tracking methods to help me. Rails 2.3.8 > > I do the normal read the order in from the database, pick up the > attributes from params[:order} and then do an > @order.update_attributes(params[:order]) The problem is that on > success, @order.changes is nil. In the console: > order.changes gives unsaved changes, so by design this will be empty after a successful save. You could do order.attributes = params[:order], inspect the changes and then save the object.
Fred -- 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 [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-talk?hl=en.

