diff options
author | Dave Rothlisberger <dave@rothlis.net> | 2009-12-28 14:33:26 +0000 |
---|---|---|
committer | Dave Rothlisberger <dave@rothlis.net> | 2009-12-28 14:33:26 +0000 |
commit | 3eeb0df402d3ba01f4237f0ccdeb086422af2314 (patch) | |
tree | b80529e6aad9aaa1a579c64a1a8bbc80fd2bba9d /activerecord/lib/active_record | |
parent | 44e8f7cf00d94ddcd9b02471782c76cc6e288739 (diff) | |
download | rails-3eeb0df402d3ba01f4237f0ccdeb086422af2314.tar.gz rails-3eeb0df402d3ba01f4237f0ccdeb086422af2314.tar.bz2 rails-3eeb0df402d3ba01f4237f0ccdeb086422af2314.zip |
Further improvement to the documentation of has_many method collection.create:
Of course the "associated object" (base model) cannot be nil, or you wouldn't
be calling this method on it. What concerns the user is that the base model
must be present in the DB.
Diffstat (limited to 'activerecord/lib/active_record')
-rwxr-xr-x | 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 56d13a4303..d90dcf090e 100755 --- a/activerecord/lib/active_record/associations.rb +++ b/activerecord/lib/active_record/associations.rb @@ -772,7 +772,7 @@ module ActiveRecord # Returns a new object of the collection type that has been instantiated # with +attributes+, linked to this object through a foreign key, and that has already # been saved (if it passed the validation). *Note*: This only works if the base model - # already exists, not if it's +nil+ or is a new (unsaved) record! + # already exists in the DB, not if it is a new (unsaved) record! # # (*Note*: +collection+ is replaced with the symbol passed as the first argument, so # <tt>has_many :clients</tt> would add among others <tt>clients.empty?</tt>.) |