Skip to content

Commit

Permalink
fix return_to anomaly (publiclab#5025)
Browse files Browse the repository at this point in the history
* fix return_to anomaly

* fix error in return_to

* fix an error in return_to

* add spaces around ==

* check within same elsif
  • Loading branch information
Anjalizi authored and jywarren committed Mar 19, 2019
1 parent d02e66c commit 2adcd76
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/controllers/user_sessions_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,9 @@ def handle_site_login_flow
redirect_to return_to + hash_params
elsif session[:return_to]
return_to = session[:return_to]
if return_to == '/login'
return_to = '/dashboard'
end
session[:return_to] = nil
redirect_to return_to + hash_params
elsif params[:return_to]
Expand Down

0 comments on commit 2adcd76

Please sign in to comment.