1
0
Fork 0
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:
Juhamatti Niemelä 2017-05-24 09:20:20 +03:00
parent ac2a25d93c
commit 58f8b0d2ea

View file

@ -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
```