Method: StandardModel::ClassMethods#allowed_param_names
- Defined in:
- lib/app/models/concerns/standard_model.rb
#allowed_param_names(filter_names = []) ⇒ Object
Return the complete list of key names that would appear in the form.
60 61 62 63 64 65 66 |
# File 'lib/app/models/concerns/standard_model.rb', line 60 def allowed_param_names(filter_names = []) # Always filter out the mongoid reserved items filter_names += %w[created_at updated_at _type _id] field_names(filter_names) rescue StandardError attribute_names.delete_if { |name| filter_names.include?(name) } end |