mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-16 23:30:12 +01:00
Record and show the last time users have logged in
This commit is contained in:
parent
950da89d76
commit
1936c90c95
4 changed files with 10 additions and 1 deletions
|
|
@ -14,6 +14,7 @@ class LoginController < ApplicationController
|
|||
case request.method
|
||||
when 'POST'
|
||||
if @user = User.authenticate(params['user_login'], params['user_password'])
|
||||
@user.update_attribute(:last_login_at, Time.now)
|
||||
return handle_post_success
|
||||
else
|
||||
handle_post_failure
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue