Skip to content

Instantly share code, notes, and snippets.

@tobyclemson
Created March 11, 2009 18:38
Show Gist options
  • Save tobyclemson/77640 to your computer and use it in GitHub Desktop.
Save tobyclemson/77640 to your computer and use it in GitHub Desktop.
module AuthenticatedSystem
protected
...
def access_denied
respond_to do |format|
format.html do
store_location
redirect_to new_session_path
end
format.any(:json, :xml) do
request_http_basic_authentication 'Web Password'
end
end
end
...
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment