Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updating readme.

  • Loading branch information...
commit e007035b36c0c0227ec66d945b0e82ea4138691a 1 parent 0a38237
@jish jish authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 README.markdown
View
4 README.markdown
@@ -97,7 +97,7 @@ class Book < ActiveRecord::Base
def self.allowed(object, subject)
rules = []
- return rules unless book.instance_of?(Book)
+ return rules unless subject.instance_of?(Book)
rules << :read_book if subject.public?
rules << :edit_book if object && object.id == subject.author_id
rules
@@ -105,7 +105,7 @@ class Book < ActiveRecord::Base
end
# View
-link_to 'Edit', edit_book_path(book) if can?(@author, :edit_book, book)
+link_to 'Edit', edit_book_path(book) if can?(@author, :edit_book, @book)
```
### Ruby Usage
Please sign in to comment.
Something went wrong with that request. Please try again.