Hello,
I have a model - Post with datetime field <added_at>. I need to set this
value to time when in created or when it updated automatically.
Thanks
Hello,
I have a model - Post with datetime field <added_at>. I need to set this
value to time when in created or when it updated automatically.
Thanks
I have a model - Post with datetime field <added_at>. I need to set this
value to time when in created or when it updated automatically.
Why not use the fields created_at and updated_at and let Rails do this
for
you?
Why not use the fields created_at and updated_at and let Rails do this
for
you?
Hello,
Thanks fro reply.
How to do it?
Hi Igor
Philip is right.Just add
created_at or created_on
updated_at or updated_on
in your table.
That’s it
On Oct 11, 2:56 pm, “Igor K.” [email protected]
I tried it - and i think i can use onle updated_at field.
Thanks
Philip is right.Just add
created_at or created_on
updated_at or updated_onin your table.
But I don’t need a two columns for this. I want to have one field that
contain datetime when it last time modified of created.
Thanks for reply
Hi Igor
Being opinionated,Rails had already decided on auto-updating on create
and on update separately
On Oct 11, 5:16 pm, “Igor K.” [email protected]
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