123456789_123456789_123456789_123456789_123456789_

Module: ActionController::PermissionsPolicy::ClassMethods

Relationships & Source Files
Defined in: actionpack/lib/action_controller/metal/permissions_policy.rb

Instance Method Summary

Instance Method Details

#permissions_policy(**options, &block)

[ GitHub ]

  
# File 'actionpack/lib/action_controller/metal/permissions_policy.rb', line 35

def permissions_policy(**options, &block)
  before_action(options) do
    if block_given?
      policy = request.permissions_policy.clone
      yield policy
      request.permissions_policy = policy
    end
  end
end