Flowdock
method

sanitize_for_mass_assignment

Importance_0
Ruby on Rails latest stable (v6.1.7.7) - 0 notes - Class: ForbiddenAttributesProtection
sanitize_for_mass_assignment(attributes) private

No documentation

This method has no description. You can help the Ruby on Rails community by adding new notes.

Hide source
# File activemodel/lib/active_model/forbidden_attributes_protection.rb, line 21
      def sanitize_for_mass_assignment(attributes)
        if attributes.respond_to?(:permitted?)
          raise ActiveModel::ForbiddenAttributesError if !attributes.permitted?
          attributes.to_h
        else
          attributes
        end
      end
Register or log in to add new notes.