method

target=

Importance_0
v7.1.3.4 - Show latest stable - 0 notes - Class: CollectionAssociation
target=(record) public

No documentation

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

Hide source
# File activerecord/lib/active_record/associations/collection_association.rb, line 281
      def target=(record)
        return super unless reflection.klass.has_many_inversing

        case record
        when nil
          # It's not possible to remove the record from the inverse association.
        when Array
          super
        else
          replace_on_target(record, true, replace: true, inversing: true)
        end
      end
Register or log in to add new notes.