views:

27

answers:

1

Is there a way to obtain the stored value, that is, the one in the database once the instance has been modified?

The problem I'm trying to solve is get the stored slug of an object that failed to save to be able to regenerate the URL.

A: 

ActiveRecord provides attrib_was getter methods for each attribute. These return the value prior to changing the attribute. See ActiveRecord::Dirty for details.

Phil Ross