aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record
diff options
context:
space:
mode:
authorVijay Dev <vijaydev.cse@gmail.com>2011-10-22 23:53:52 +0530
committerVijay Dev <vijaydev.cse@gmail.com>2011-10-22 23:53:52 +0530
commit1c1c3fc2c06fc02e67a8272adf2c2d2381e005b4 (patch)
tree9e70b530ac1d204527b60bc7c93bfc47015520c7 /activerecord/lib/active_record
parentf0a9411edef407897888db6eaad849827d564293 (diff)
downloadrails-1c1c3fc2c06fc02e67a8272adf2c2d2381e005b4.tar.gz
rails-1c1c3fc2c06fc02e67a8272adf2c2d2381e005b4.tar.bz2
rails-1c1c3fc2c06fc02e67a8272adf2c2d2381e005b4.zip
minor fixes in the composed_of doc
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r--activerecord/lib/active_record/aggregations.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/aggregations.rb b/activerecord/lib/active_record/aggregations.rb
index 81ddbba51e..5a8addc4e4 100644
--- a/activerecord/lib/active_record/aggregations.rb
+++ b/activerecord/lib/active_record/aggregations.rb
@@ -172,8 +172,8 @@ module ActiveRecord
# with this option.
# * <tt>:mapping</tt> - Specifies the mapping of entity attributes to attributes of the value
# object. Each mapping is represented as an array where the first item is the name of the
- # entity attribute and the second item is the name the attribute in the value object. The
- # order in which mappings are defined determine the order in which attributes are sent to the
+ # entity attribute and the second item is the name of the attribute in the value object. The
+ # order in which mappings are defined determines the order in which attributes are sent to the
# value class constructor.
# * <tt>:allow_nil</tt> - Specifies that the value object will not be instantiated when all mapped
# attributes are +nil+. Setting the value object to +nil+ has the effect of writing +nil+ to all
@@ -191,7 +191,8 @@ module ActiveRecord
#
# Option examples:
# composed_of :temperature, :mapping => %w(reading celsius)
- # composed_of :balance, :class_name => "Money", :mapping => %w(balance amount), :converter => Proc.new { |balance| balance.to_money }
+ # composed_of :balance, :class_name => "Money", :mapping => %w(balance amount),
+ # :converter => Proc.new { |balance| balance.to_money }
# composed_of :address, :mapping => [ %w(address_street street), %w(address_city city) ]
# composed_of :gps_location
# composed_of :gps_location, :allow_nil => true