On Jan 8, 4:06 am, Evan <[email protected]> wrote: > 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.
Can you show exactly what you did and exactly what happened ? I can't imagine why this wouldn't work. Fred > > 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 [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.

