diff options
author | Jon Leighton <j@jonathanleighton.com> | 2011-01-07 15:31:01 +0000 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-01-11 13:45:06 -0800 |
commit | 00dc8f77a2f9962d1bcd6267c63632bb39e6c547 (patch) | |
tree | d894860bc6834b30ce46a246b8c3ffbe3c43915c /activerecord | |
parent | 1390a443289dbe4bfed63bfd3192c8c6a29fd833 (diff) | |
download | rails-00dc8f77a2f9962d1bcd6267c63632bb39e6c547.tar.gz rails-00dc8f77a2f9962d1bcd6267c63632bb39e6c547.tar.bz2 rails-00dc8f77a2f9962d1bcd6267c63632bb39e6c547.zip |
For a singular association, it should be build_association, rather than association.build (as association may be nil)
Diffstat (limited to 'activerecord')
-rw-r--r-- | activerecord/lib/active_record/associations.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb index 7659bd2d37..5f29f7c6f2 100644 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -337,7 +337,7 @@ module ActiveRecord # * If either of these saves fail (due to one of the objects being invalid) the assignment # statement returns +false+ and the assignment is cancelled. # * If you wish to assign an object to a +has_one+ association without saving it, - # use the <tt>association.build</tt> method (documented below). + # use the <tt>build_association</tt> method (documented below). # * Assigning an object to a +belongs_to+ association does not save the object, since # the foreign key field belongs on the parent. It does not save the parent either. # |