method

sanitize_for_mass_assignment

rails latest stable - Class: ActiveModel::ForbiddenAttributesProtection
sanitize_for_mass_assignment(attributes)
private

No documentation available.

# 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