Hi,
I just noticed that updated_on is not working anymore on any of my
models. I don’t know what happened . Hower, when I create a new
record, created_on is still working.
Any ideas what could be the cause?
Greetz
Hi,
I just noticed that updated_on is not working anymore on any of my
models. I don’t know what happened . Hower, when I create a new
record, created_on is still working.
Any ideas what could be the cause?
Greetz
Quoting Maarten P. [email protected]:
Hi,
I just noticed that updated_on is not working anymore on any of my
models. I don’t know what happened. Hower, when I create a new
record, created_on is still working.Any ideas what could be the cause?
Did you just update to Rails 2.1? Only changed attributes are written
on
save. If no attributes are changed, then nothing is written to the
database,
not even updated_on/updated_at. Of course, setting updated_at =
Time.now will
force a change (not sure what the equivalent is for updated_on).
HTH,
Jeffrey
Hey Jeffrey,
I did indeed update to rails 2.1 recently … It really makes sense
because I was probably updating associated models. Forcing updated_on =
Time.now fixed the problem.
Thanks Jeffrey
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