diff --git a/app/controllers/login_controller.rb b/app/controllers/login_controller.rb --- a/app/controllers/login_controller.rb +++ b/app/controllers/login_controller.rb @@ -22,6 +22,9 @@ end end + #save login information + Login.create(user_id: user.id, ip_address: request.remote_ip) + redirect_to :controller => 'main', :action => 'list' else flash[:notice] = 'Wrong password'