mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Association guide: change wording to say that build is for initialization, create is for creating
This commit is contained in:
@@ -550,7 +550,7 @@ build_customer
|
||||
create_customer
|
||||
</ruby>
|
||||
|
||||
NOTE: When creating a new +belongs_to+ or +has_one+ association you must use the +build_+ prefix to build the association, rather than the +association.build+ method that would be used for +has_many+ or +has_and_belongs_to_many+ associations.
|
||||
NOTE: When initializing a new +has_one+ or +belongs_to+ association you must use the +build_+ prefix to build the association, rather than the +association.build+ method that would be used for +has_many+ or +has_and_belongs_to_many+ associations. To create one, use the +create_+ prefix.
|
||||
|
||||
h6(#belongs_to-association). <tt><em>association</em>(force_reload = false)</tt>
|
||||
|
||||
@@ -819,7 +819,7 @@ build_account
|
||||
create_account
|
||||
</ruby>
|
||||
|
||||
NOTE: When creating a new +has_one+ or +belongs_to+ association you must use the +build_+ prefix to build the association, rather than the +association.build+ method that would be used for +has_many+ or +has_and_belongs_to_many+ associations.
|
||||
NOTE: When initializing a new +has_one+ or +belongs_to+ association you must use the +build_+ prefix to build the association, rather than the +association.build+ method that would be used for +has_many+ or +has_and_belongs_to_many+ associations. To create one, use the +create_+ prefix.
|
||||
|
||||
h6(#has_one-association). <tt><em>association</em>(force_reload = false)</tt>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user