nathanl / authority

*CURRENTLY UNMAINTAINED*. Authority helps you authorize actions in your Rails app. It's ORM-neutral and has very little fancy syntax; just group your models under one or more Authorizer classes and write plain Ruby methods on them.
MIT License
1.21k stars 67 forks source link

Fixed error in README concerning default authorizer name. #80

Closed binarypaladin closed 10 years ago

binarypaladin commented 10 years ago

If I'm understanding things correctly, this example was incorrect.

nathanl commented 10 years ago

Thanks for noticing! The example was outdated and only half correct. The actual behavior is that, if the authorizer is not specified, it tries ArticleAuthorizer, and if there's no such constant, it uses ApplicationAuthorizer. The code is here:

https://github.com/nathanl/authority/blob/45409637d81621445be383ce32e1f4bc05dd5434/lib/authority/abilities.rb#L19

Merging your correction! I'm going to do one more tiny tweak to it, though, for extra clarity.

Thanks! :thumbsup: :smile: