mirror of
https://github.com/varvet/pundit.git
synced 2022-11-09 12:30:11 -05:00
Merge pull request #75 from joelcogen/master
README: Fix Scope definition example
This commit is contained in:
commit
055509ea3a
1 changed files with 1 additions and 1 deletions
|
@ -157,7 +157,7 @@ define a class called a policy scope. It can look something like this:
|
|||
|
||||
``` ruby
|
||||
PostPolicy = Struct.new(:user, :post) do
|
||||
Scope = Struct.new(:user, :scope) do
|
||||
self::Scope = Struct.new(:user, :scope) do
|
||||
def resolve
|
||||
if user.admin?
|
||||
scope.all
|
||||
|
|
Loading…
Reference in a new issue