Add last user login and activity
This commit is contained in:
parent
c59ee3a6a7
commit
700eed27b8
8 changed files with 25 additions and 5 deletions
|
|
@ -9,6 +9,7 @@ class SessionsController < ApplicationController
|
|||
def create
|
||||
user = User.authenticate(params[:nick], params[:password])
|
||||
if user
|
||||
user.update_attribute(:last_login, Time.now)
|
||||
login user
|
||||
if session[:return_to].present?
|
||||
redirect_to_url = session[:return_to]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue