mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #44210 from composerinteralia/inverse-of-api-docs
Adjust association inverse_of docs [ci skip]
This commit is contained in:
commit
10ef5321c1
1 changed files with 10 additions and 10 deletions
|
@ -1353,8 +1353,8 @@ module ActiveRecord
|
|||
# of this class in lower-case and "_id" suffixed. So a Person class that makes a #has_many
|
||||
# association will use "person_id" as the default <tt>:foreign_key</tt>.
|
||||
#
|
||||
# If you are going to modify the association (rather than just read from it), then it is
|
||||
# a good idea to set the <tt>:inverse_of</tt> option.
|
||||
# Setting the <tt>:foreign_key</tt> option prevents automatic detection of the association's
|
||||
# inverse, so it is generally a good idea to set the <tt>:inverse_of</tt> option as well.
|
||||
# [:foreign_type]
|
||||
# Specify the column used to store the associated object's type, if this is a polymorphic
|
||||
# association. By default this is guessed to be the name of the polymorphic association
|
||||
|
@ -1410,7 +1410,7 @@ module ActiveRecord
|
|||
# a good idea to set the <tt>:inverse_of</tt> option on the source association on the
|
||||
# join model. This allows associated records to be built which will automatically create
|
||||
# the appropriate join model records when they are saved. (See the 'Association Join Models'
|
||||
# section above.)
|
||||
# and 'Setting Inverses' sections above.)
|
||||
# [:disable_joins]
|
||||
# Specifies whether joins should be skipped for an association. If set to true, two or more queries
|
||||
# will be generated. Note that in some cases, if order or limit is applied, it will be done in-memory
|
||||
|
@ -1548,8 +1548,8 @@ module ActiveRecord
|
|||
# of this class in lower-case and "_id" suffixed. So a Person class that makes a #has_one association
|
||||
# will use "person_id" as the default <tt>:foreign_key</tt>.
|
||||
#
|
||||
# If you are going to modify the association (rather than just read from it), then it is
|
||||
# a good idea to set the <tt>:inverse_of</tt> option.
|
||||
# Setting the <tt>:foreign_key</tt> option prevents automatic detection of the association's
|
||||
# inverse, so it is generally a good idea to set the <tt>:inverse_of</tt> option as well.
|
||||
# [:foreign_type]
|
||||
# Specify the column used to store the associated object's type, if this is a polymorphic
|
||||
# association. By default this is guessed to be the name of the polymorphic association
|
||||
|
@ -1575,7 +1575,7 @@ module ActiveRecord
|
|||
# a good idea to set the <tt>:inverse_of</tt> option on the source association on the
|
||||
# join model. This allows associated records to be built which will automatically create
|
||||
# the appropriate join model records when they are saved. (See the 'Association Join Models'
|
||||
# section above.)
|
||||
# and 'Setting Inverses' sections above.)
|
||||
# [:disable_joins]
|
||||
# Specifies whether joins should be skipped for an association. If set to true, two or more queries
|
||||
# will be generated. Note that in some cases, if order or limit is applied, it will be done in-memory
|
||||
|
@ -1701,8 +1701,8 @@ module ActiveRecord
|
|||
# <tt>belongs_to :favorite_person, class_name: "Person"</tt> will use a foreign key
|
||||
# of "favorite_person_id".
|
||||
#
|
||||
# If you are going to modify the association (rather than just read from it), then it is
|
||||
# a good idea to set the <tt>:inverse_of</tt> option.
|
||||
# Setting the <tt>:foreign_key</tt> option prevents automatic detection of the association's
|
||||
# inverse, so it is generally a good idea to set the <tt>:inverse_of</tt> option as well.
|
||||
# [:foreign_type]
|
||||
# Specify the column used to store the associated object's type, if this is a polymorphic
|
||||
# association. By default this is guessed to be the name of the association with a "_type"
|
||||
|
@ -1930,8 +1930,8 @@ module ActiveRecord
|
|||
# a #has_and_belongs_to_many association to Project will use "person_id" as the
|
||||
# default <tt>:foreign_key</tt>.
|
||||
#
|
||||
# If you are going to modify the association (rather than just read from it), then it is
|
||||
# a good idea to set the <tt>:inverse_of</tt> option.
|
||||
# Setting the <tt>:foreign_key</tt> option prevents automatic detection of the association's
|
||||
# inverse, so it is generally a good idea to set the <tt>:inverse_of</tt> option as well.
|
||||
# [:association_foreign_key]
|
||||
# Specify the foreign key used for the association on the receiving side of the association.
|
||||
# By default this is guessed to be the name of the associated class in lower-case and "_id" suffixed.
|
||||
|
|
Loading…
Reference in a new issue