1
0
Fork 0
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:
Thomas Klemm 2013-11-14 06:07:11 -08:00
commit 055509ea3a

View file

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