diff options
author | willnet <netwillnet@gmail.com> | 2017-05-24 13:04:03 +0900 |
---|---|---|
committer | willnet <netwillnet@gmail.com> | 2017-05-24 13:04:03 +0900 |
commit | d225f0b94c9d89e8837ee8e98ee3a7837877631b (patch) | |
tree | 7162dbf0956c8b056f8776251ca0d2e6f3f8b50d | |
parent | f19f4270d014156e9ac6276789ed08b2936b8cd7 (diff) | |
download | rails-d225f0b94c9d89e8837ee8e98ee3a7837877631b.tar.gz rails-d225f0b94c9d89e8837ee8e98ee3a7837877631b.tar.bz2 rails-d225f0b94c9d89e8837ee8e98ee3a7837877631b.zip |
[ci skip]fix wrong method name in docs
-rw-r--r-- | guides/source/association_basics.md | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guides/source/association_basics.md b/guides/source/association_basics.md index 5794bfa666..d8e85497fa 100644 --- a/guides/source/association_basics.md +++ b/guides/source/association_basics.md @@ -599,7 +599,7 @@ class CreateBooks < ActiveRecord::Migration[5.0] t.string :book_number t.integer :author_id end - + add_index :books, :author_id add_foreign_key :books, :authors end @@ -1417,7 +1417,7 @@ If either of these saves fails due to validation errors, then the assignment sta If the parent object (the one declaring the `has_one` association) is unsaved (that is, `new_record?` returns `true`) then the child objects are not saved. They will automatically when the parent object is saved. -If you want to assign an object to a `has_one` association without saving the object, use the `association.build` method. +If you want to assign an object to a `has_one` association without saving the object, use the `build_association` method. ### `has_many` Association Reference |