When a user edits and submits an existing record I need to perform
conditional logic based on whether the user has actually changed any of
the values.
What would be the best way to detect changes? Thanks.
When a user edits and submits an existing record I need to perform
conditional logic based on whether the user has actually changed any of
the values.
What would be the best way to detect changes? Thanks.
Save the existing record to a variable before presenting to the user,
once the user submits, compare the new from the old.
Dan M. wrote:
When a user edits and submits an existing record I need to perform
conditional logic based on whether the user has actually changed any of
the values.What would be the best way to detect changes? Thanks.
http://svn.viney.net.nz/things/rails/plugins/acts_as_modified/
@person = Person.find(:first)
@person.modified?
-Jonathan.
Perfect, thanks.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs