I am using Rails 2.3 and trying to have the submission date of a form changed only the first time that all required fields are filled.
Here's what I tried, both in before_save and before_update:
if ((self.required_fields_filled == true) and (self.required_fields_filled_was == false))
self.submitted_at = Time.now
end
As long as required_fields_filled is currently true, it always updates submitted_at to Time.now
Any idea what I'm doing wrong?
This worked for me: