Created
June 7, 2019 13:52
-
-
Save edlvj/b8e39b66eebae67a603b4d39cf9e8864 to your computer and use it in GitHub Desktop.
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 set_back_url | |
return if request.referer.blank? | |
if referer_path.include?(city_establishments_path) | |
session['gcd_back_url'] = referer_path | |
return | |
end | |
if referer_path.eql?(city_grease_traps_path) | |
session['gcd_back_url'] = city_grease_traps_path | |
return | |
end | |
session['gcd_back_url'] ||= city_grease_traps_path | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment