123456789_123456789_123456789_123456789_123456789_

Module: ActiveModel::ForbiddenAttributesProtection

Do not use. This module is for internal use only.

Instance Method Summary

Instance Method Details

#sanitize_for_mass_assignment(attributes) (private) Also known as: #sanitize_forbidden_attributes

[ GitHub ]

  
# File 'activemodel/lib/active_model/forbidden_attributes_protection.rb', line 23

def sanitize_for_mass_assignment(attributes)
  if attributes.respond_to?(:permitted?)
    raise ActiveModel::ForbiddenAttributesError if !attributes.permitted?
    attributes.to_h
  else
    attributes
  end
end

#sanitize_forbidden_attributes(attributes) (private)

[ GitHub ]

  
# File 'activemodel/lib/active_model/forbidden_attributes_protection.rb', line 31

alias :sanitize_forbidden_attributes :sanitize_for_mass_assignment