I have a table that has 3 datetime fields.
The first functions like a normal timestamp; I don’t handle it specially
in my create
method, and it’s updated just fine. It’s called “created_on”
The second is supposed to be a “last_updated” field, as it’s important
to know when
something was created and when it was last updated.
The third datetime field is meant to attach a user-defined date to the
record in the table.
I’m trying to set the second two manually, with certain input. I can’t
get either of them to
update. On the second, in my controller I’m trying:
@goal.last_updated = Time.now
On the third, I’m trying to capture user input with (inside a form
<%= f.date_select :duedate %>
Neither the second or the third are being updated in the table. What am
i doing wrong?
Thanks so much in advance!