mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
Fix code examples in Scopes section
Rename reference to `` post `` to `` record `` which would be currently correct one when Policy class inherits ApplicationPolicy.
This commit is contained in:
parent
ac2a25d93c
commit
58f8b0d2ea
1 changed files with 2 additions and 2 deletions
|
@ -221,7 +221,7 @@ class PostPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def update?
|
||||
user.admin? or not post.published?
|
||||
user.admin? or not record.published?
|
||||
end
|
||||
end
|
||||
```
|
||||
|
@ -254,7 +254,7 @@ class PostPolicy < ApplicationPolicy
|
|||
end
|
||||
|
||||
def update?
|
||||
user.admin? or not post.published?
|
||||
user.admin? or not record.published?
|
||||
end
|
||||
end
|
||||
```
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue