method

set_inverse

rails latest stable - Class: ActiveRecord::Associations::Preloader::Association

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (v7.0.0) is shown here.

set_inverse(record)
public

No documentation available.

# File activerecord/lib/active_record/associations/preloader/association.rb, line 171
        def set_inverse(record)
          if owners = owners_by_key[convert_key(record[association_key_name])]
            # Processing only the first owner
            # because the record is modified but not an owner
            association = owners.first.association(reflection.name)
            association.set_inverse_instance(record)
          end
        end