Closed shlomizadok closed 11 years ago
Hey @shlomizadok,
resource
isn't available in the class methods (as it get's passed in when creating in instance). If change your updatable_by?
method to an instance method (remove the self.
it) you'll be able to use that code for authorizing resources. Let me know if that helps.
Thanks!
@adamhunter -- Works like charm! Thank you so much!
Hi, I try using authority (great gem and concept). I have followed the readme. When I try to check an instance, I get the following error:
My Group model looks like:
My GroupController looks like:
And my SchoolAuthorizer:
And I get the error above (undefined local variable or method `resource' for SchoolAuthorizer:Class ) What am I doing wrong? Thanks for helping