lib/generators/jinda/templates/app/controllers/jinda_org/sessions_controller.rb in jinda-0.7.0.1 vs lib/generators/jinda/templates/app/controllers/jinda_org/sessions_controller.rb in jinda-0.7.0.2
- old
+ new
@@ -3,10 +3,11 @@
def new
@title= 'Sign In'
end
def failure
+ # redirect_to login_path, alert: "Authentication failed, please try again."
redirect_to login_path, alert: "Authentication failed, please try again."
end
# to refresh the page, must know BEFOREHAND that the action needs refresh
# then use attribute 'data-ajax'=>'false'
@@ -19,12 +20,12 @@
cookies.permanent[:auth_token] = user.auth_token
else
cookies[:auth_token] = user.auth_token
end
# refresh_to root_path, :ma_notice => "Logged in" # Called by jinda_conroller
- # redirect_to root_path
- redirect_to articles_my_path
+ redirect_to root_path
+ # redirect_to articles_my_path
rescue
redirect_to root_path, :alert=> "Authentication failed, please try again."
end
@@ -36,8 +37,8 @@
end
def failure
ma_log "Authentication failed, please try again."
- redirect_to root_path, :alert=> "Authentication failed, please try again."
+ redirect_to new_session_path, :alert=> "Authentication failed, please try again."
end
end