Browse files

Stop checking `respond_to?` on controllers.

We don't want to force controllers to make any
method public that shouldn't be a routable
  • Loading branch information...
1 parent 9425a0e commit d54e4bd42fd106325fd112ce5159db433368a225 Nathan Long committed Feb 14, 2013
Showing with 2 additions and 1 deletion.
  1. +2 −1 lib/authority/controller.rb
@@ -96,7 +96,8 @@ def run_authorization_check
def authority_resource
return self.class.authority_resource if self.class.authority_resource.is_a?(Class)
- return send(self.class.authority_resource) if respond_to?(self.class.authority_resource)
+ send(self.class.authority_resource)
+ rescue NoMethodError => e
"Trying to authorize actions for '#{self.class.authority_resource}', but can't. \
Must be either a resource class OR the name of a controller instance method that \

0 comments on commit d54e4bd

Please sign in to comment.