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.
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.
ActiveRecord provides attrib_was
getter methods for each attribute. These return the value prior to changing the attribute. See ActiveRecord::Dirty
for details.