module Sand
Constants
- VERSION
Public Class Methods
policy!(user, record)
click to toggle source
# File lib/sand.rb, line 35 def self.policy!(user, record) policy = PolicyFinder.new(record).policy! policy.new(user, record) end
policy_scope(user, scope)
click to toggle source
# File lib/sand.rb, line 40 def self.policy_scope(user, scope) policy_scope = PolicyFinder.new(scope).scope! policy_scope.new(user, scope).resolve end