module Pundit::Authorization

def policy(record)

Returns:
  • (Object, nil) - instance of policy class with query methods

Parameters:
  • record (Object) -- the object we're retrieving the policy for

Other tags:
    See: https://github.com/varvet/pundit#policies -
def policy(record)
  policies[record] ||= Pundit.policy!(pundit_user, record)
end