Is there a way to manipulate the attributes of an ActiveRecord-based
model after it is retrieved from the database but before it is
returned from the finder?

I have tried defining an after_find callback method but was unable to
access attributes that come from the database from this method. I
tried accessing them using self.an_attribute and read_attribute but
both raised an attribute exception.

I am trying to execute an upgrade-in-place strategy. When I deploy the
latest version of my app one of the attributes on every existing
record of a particular table will no longer be usable until converted
to a new format. Rather than take the app down for 12 hours to upgrade
the existing data I thought it could be upgraded on-access.

Evan

-- 
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-t...@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.

Reply via email to