Skip to content

Commit

Permalink
Merge pull request #5642 from rubyforgood/case-contact-form-bug-fix-2
Browse files Browse the repository at this point in the history
Case contact form fix for referrer
  • Loading branch information
compwron authored Apr 26, 2024
2 parents 125ec6f + 9f4ca28 commit 99e2382
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,9 @@ def sms_acct_creation_notice(resource_name, sms_status)
end

def store_referring_location
session[:return_to] = request.referer unless request.referer.end_with?("users/sign_in")
if request.referer && !request.referer.end_with?("users/sign_in")
session[:return_to] = request.referer
end
end

def redirect_back_to_referer(fallback_location:)
Expand Down

0 comments on commit 99e2382

Please sign in to comment.