making sure this is up to date
This commit is contained in:
@@ -8,7 +8,6 @@ class SessionsController < ApplicationController
|
||||
redirect_to home_dashboard_index_path if current_user
|
||||
end
|
||||
|
||||
|
||||
def create
|
||||
path = params[:url].present? ? params[:url] : home_dashboard_index_path
|
||||
begin
|
||||
@@ -20,10 +19,9 @@ class SessionsController < ApplicationController
|
||||
|
||||
if user
|
||||
if params[:remember_me]
|
||||
cookies.permanent[:auth_token] = user.auth_token if User.where(:user_id => user.user_id).exists?
|
||||
cookies.permanent[:auth_token] = user.auth_token if User.where(:user_id => user.user_id).exists?
|
||||
else
|
||||
session[:user_id] = user.user_id if User.where(:user_id => user.user_id).exists?
|
||||
#cookies[:auth_token] = user.auth_token if User.where(:user_id => user.user_id).exists?
|
||||
end
|
||||
redirect_to path
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user