Module: Protobuf::ActiveRecord::MassAssignmentSecurity::Transformation::ClassMethods
- Defined in:
- lib/protobuf/active_record/mass_assignment_security/transformation.rb
Instance Method Summary collapse
-
#_filtered_attributes ⇒ Object
Filters protected attributes from the available attributes list.
Instance Method Details
#_filtered_attributes ⇒ Object
Filters protected attributes from the available attributes list. When set through accessible attributes, returns the accessible attributes. When set through protected attributes, returns the attributes minus any protected attributes.
:nodoc:
16 17 18 19 20 21 22 |
# File 'lib/protobuf/active_record/mass_assignment_security/transformation.rb', line 16 def _filtered_attributes if accessible_attributes.present? accessible_attributes.to_a else self.attribute_names - protected_attributes.to_a end end |