lib/generators/templates/access_policy.rb in access-granted-1.0.3 vs lib/generators/templates/access_policy.rb in access-granted-1.0.4

- old
+ new

@@ -1,9 +1,9 @@ class AccessPolicy include AccessGranted::Policy - def configure(user) + def configure # Example policy for AccessGranted. # For more details check the README at # # https://github.com/chaps-io/access-granted/blob/master/README.md # @@ -22,10 +22,10 @@ # More privileged role, applies to registered users. # # role :member, proc { |user| user.registered? } do # can :create, Post # can :create, Comment - # can [:update, :destroy], Post do |post| + # can [:update, :destroy], Post do |post, user| # post.author == user # end # end # The base role with no additional conditions.