Permalink
Browse files

Bugfix for Rails 3.1

Apparently Rails 3.1 `class_attribute` doesn't
honor `:instance_reader => false` and stomps on
instance methods of the same name
  • Loading branch information...
1 parent 9c4cb8a commit fe813c8fcb818e8e27f0aa96f5a44f469edacddb Nathan Long committed Feb 20, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/authority/controller.rb
@@ -89,10 +89,10 @@ def authority_forbidden(error)
# The `before_filter` that will be setup to run when the class method
# `authorize_actions_for` is called
def run_authorization_check
- authorize_action_for authority_resource
+ authorize_action_for instance_authority_resource
end
- def authority_resource
+ def instance_authority_resource
return self.class.authority_resource if self.class.authority_resource.is_a?(Class)
send(self.class.authority_resource)
rescue NoMethodError => e

0 comments on commit fe813c8

Please sign in to comment.