aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorrhenium <re4k@re4k.info>2013-05-30 17:22:55 +0900
committerrhenium <re4k@re4k.info>2013-05-30 17:22:55 +0900
commit72fb7942e6ea02b7182a3442175332009d1dac14 (patch)
tree7792addac50616724da96feafe433f9e0536785c /app/controllers/application_controller.rb
parent75e30f750533af57057fd5a9b7f725218f4be7d0 (diff)
downloadaclog-72fb7942e6ea02b7182a3442175332009d1dac14.tar.gz
improve error pages
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb
index bd7112a..085baf1 100644
--- a/app/controllers/application_controller.rb
+++ b/app/controllers/application_controller.rb
@@ -45,13 +45,13 @@ class ApplicationController < ActionController::Base
end
def authorize_to_show_user!(user)
- authorized_to_show_user?(user) or raise Aclog::Exceptions::UserProtected
+ authorized_to_show_user?(user) or raise Aclog::Exceptions::UserProtected.new(user)
end
def authorize_to_show_best!(user)
authorize_to_show_user!(user)
- raise Aclog::Exceptions::UserNotRegistered unless user.registered?
- raise Aclog::Exceptions::AccountPrivate if user.account.private? && user.id != session[:user_id]
+ raise Aclog::Exceptions::UserNotRegistered.new(user) unless user.registered?
+ raise Aclog::Exceptions::AccountPrivate.new(user) if user.account.private? && user.id != session[:user_id]
true
end