Skip to content

Instantly share code, notes, and snippets.

@aghecht
Created February 7, 2010 03:33
Show Gist options
  • Save aghecht/297181 to your computer and use it in GitHub Desktop.
Save aghecht/297181 to your computer and use it in GitHub Desktop.
# This code fixes the error:
# undefined method `relative_url_root' for SessionsController:Class
def requested_url
relative_url_root = self.class.respond_to?(:relative_url_root) ? self.class.relative_url_root.to_s : request.relative_url_root
"#{request.protocol + request.host_with_port + relative_url_root + request.path}"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment