Module: PermittedAttributes::ClassMethods
- Defined in:
- lib/permitted_attributes/permitted_attributes.rb
Instance Method Summary collapse
Instance Method Details
#excluded_attributes(*attrs, skip_defaults: false) ⇒ Object
13 14 15 16 |
# File 'lib/permitted_attributes/permitted_attributes.rb', line 13 def excluded_attributes(*attrs, skip_defaults: false) @excluded_attributes = *attrs @skip_defaults = skip_defaults end |
#permitted_attributes ⇒ Object
7 8 9 10 11 |
# File 'lib/permitted_attributes/permitted_attributes.rb', line 7 def permitted_attributes return [] unless respond_to?(:column_names) (column_names || []).map(&:to_sym) - attributes_to_exclude end |