I need to track the most recent user login date.  I have been using
the following in the front controller's index action:

 User.update(current_user.id, {:updated_at => Time.now})

This, works, but on the rare occations that someone revisits the home
screen during a session, the date gets set again.  It also seems a
little silly to set the update_at field, which gets set correctly
automatically when the user record is updated.  I chose this field,
because there is no danger of changing real user data.

So, I have two questions.
1. Is there a place to force a user record update right after login so
thst it can only happen once?
2. Is there a better way to force an update to the user record to set
the update_at field?

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/hobousers?hl=en.

Reply via email to