Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Small misprint in readme #1

Closed
wants to merge 3 commits into
from
Jump to file or symbol
Failed to load files and symbols.
+2 −4
Split
View
@@ -60,7 +60,7 @@ class BookRules
# you are free to write any conditions you need
if book.author?(author) && book.is_approved? # ....etc...
- rules << :publis_book
+ rules << :publish_book
end
rules # return array of abilities
@@ -168,7 +168,7 @@ abilities.allowed? ... # use rules from BookRules only -> more perfomance
```ruby
class BookRules
def self.allowed(author, book)
- [:read_book, :edit_book, :publis_book]
+ [:read_book, :edit_book, :publish_book]
end
end
View
@@ -93,8 +93,6 @@ def remove_pack!(name)
def valid_rules_object?(object)
object.respond_to?(:allowed) &&
object.send(:allowed, nil, nil).kind_of?(Array)
- rescue
- false
end
# Check if authorization class has pack with such name