README.md in permisi-0.1.4 vs README.md in permisi-0.1.5
- old
+ new
@@ -167,11 +167,11 @@
```
You can then interact using `#permisi` method:
```ruby
-user = User.find_by_email "esther@example.com"
+user = User.find_by_email("esther@example.com")
user.permisi # => instance of Actor
admin_role = Permisi.roles.find_by_slug(:admin)
admin_role.allows?("books.delete") # == true
@@ -196,10 +196,10 @@
### Actor roles eager loading
Although checking whether an actor has a role goes against a good RBAC practice, it is still possible on Permisi. Calling `role?` multiple times will only make one call to the database:
```ruby
-user = User.find_by_email "esther@example.com"
+user = User.find_by_email("esther@example.com")
user.permisi.role?(:admin) # eager loads roles
user.permisi.role?(:admin) # uses the eager-loaded roles
user.permisi.has_role?(:admin) # uses the eager-loaded roles
```