Created
June 30, 2014 20:40
-
-
Save stevenabrooks/6df607535258ea58c451 to your computer and use it in GitHub Desktop.
I added the params[:origin] to the email_preferences if there was no user, let me know what you think
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def sign_in | |
params[:return_to] ||= "back" | |
save_return_point | |
if request.post? and perform_login and params[:origin] != 'email_preferences' | |
#report_from_server :category => 'login', # User logged in | |
# :action => 'success', | |
# :label => "user_id=[#{current_user.id}]" | |
redirect_to_return_point | |
elsif request.post? and perform_login and params[:origin] == 'email_preferences' | |
redirect_to :action => 'email_preferences' | |
else | |
if params[:ajax] || params[:dialog] || @dialog | |
@dialog = true | |
render :template => "/user/login_2014_dialog", :layout => false | |
else | |
render :template => "/user/login_2014", :layout => "app" | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment