summaryrefslogtreecommitdiff
path: root/app/controllers/controller_extension/errors.rb
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-03-30 17:06:32 -0700
committerelijah <elijah@riseup.net>2016-03-30 17:06:32 -0700
commit48acca107b9bd7a59bacb1449b042eb753e63917 (patch)
treece8bee7d2fa4007a1db9815e1af001fe44e329c1 /app/controllers/controller_extension/errors.rb
parentbd5ffce445fd91eac32ac1309297e7e3cf05ead8 (diff)
api: return proper 404 for GET /1/identities/:id.json
Diffstat (limited to 'app/controllers/controller_extension/errors.rb')
-rw-r--r--app/controllers/controller_extension/errors.rb3
1 files changed, 3 insertions, 0 deletions
diff --git a/app/controllers/controller_extension/errors.rb b/app/controllers/controller_extension/errors.rb
index 2b68955..3d919b0 100644
--- a/app/controllers/controller_extension/errors.rb
+++ b/app/controllers/controller_extension/errors.rb
@@ -6,16 +6,19 @@ module ControllerExtension::Errors
def access_denied
render_error :not_authorized, :forbidden, home_url
end
+ alias_method :render_access_denied, :access_denied
def login_required
# Warden will intercept the 401 response and call
# SessionController#unauthenticated instead.
render_error :not_authorized_login, :unauthorized, login_url
end
+ alias_method :render_login_required, :login_required
def not_found(msg=nil, url=nil)
render_error(msg || :not_found, :not_found, url || home_url)
end
+ alias_method :render_not_found, :not_found
private