aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/associations.rb
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-10-02 10:52:55 -0300
committerEmilio Tagua <miloops@gmail.com>2009-10-02 10:52:55 -0300
commit29457a21c0d4451f5dbc66f72b8256baa02a55bd (patch)
tree50aebb7b31b990b805871e816b852151df2833a1 /activerecord/lib/active_record/associations.rb
parent5f9540e4830ace3459b4018006573bad7fb30b53 (diff)
parent420004e030e96f2ace6e27fd622c90ee9e986677 (diff)
downloadrails-29457a21c0d4451f5dbc66f72b8256baa02a55bd.tar.gz
rails-29457a21c0d4451f5dbc66f72b8256baa02a55bd.tar.bz2
rails-29457a21c0d4451f5dbc66f72b8256baa02a55bd.zip
Merge commit 'rails/master'
Diffstat (limited to 'activerecord/lib/active_record/associations.rb')
-rwxr-xr-xactiverecord/lib/active_record/associations.rb4
1 files changed, 3 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/associations.rb b/activerecord/lib/active_record/associations.rb
index c83fbc3508..1e1f1a4c57 100755
--- a/activerecord/lib/active_record/associations.rb
+++ b/activerecord/lib/active_record/associations.rb
@@ -938,7 +938,9 @@ module ActiveRecord
# if the real class name is Person, you'll have to specify it with this option.
# [:conditions]
# Specify the conditions that the associated object must meet in order to be included as a +WHERE+
- # SQL fragment, such as <tt>rank = 5</tt>.
+ # SQL fragment, such as <tt>rank = 5</tt>. Record creation from the association is scoped if a hash
+ # is used. <tt>has_one :account, :conditions => {:enabled => true}</tt> will create an enabled account with <tt>@company.create_account</tt>
+ # or <tt>@company.build_account</tt>.
# [:order]
# Specify the order in which the associated objects are returned as an <tt>ORDER BY</tt> SQL fragment,
# such as <tt>last_name, first_name DESC</tt>.