Module: Pundit::ExpectedAttributeValues::Authorization::ControllerMethods
- Defined in:
- lib/pundit/expected_attribute_values/authorization.rb
Instance Method Summary collapse
- #expected_attributes(record, action: action_name, **options) ⇒ Object
- #pundit_expected_attribute_values_for(record, attribute, action: action_name) ⇒ Object
Instance Method Details
#expected_attributes(record, action: action_name, **options) ⇒ Object
18 19 20 21 |
# File 'lib/pundit/expected_attribute_values/authorization.rb', line 18 def expected_attributes(record, action: action_name, **) raw = super apply_expected_values_filter(record, raw, action) end |
#pundit_expected_attribute_values_for(record, attribute, action: action_name) ⇒ Object
14 15 16 |
# File 'lib/pundit/expected_attribute_values/authorization.rb', line 14 def pundit_expected_attribute_values_for(record, attribute, action: action_name) policy(record).pundit_expected_attribute_values_for_attribute(attribute, action: action) end |