Permalink
Browse files

Update the inlined documentation

  • Loading branch information...
franckverrot committed May 31, 2011
1 parent f2a0a46 commit 31c3e46c3d5272081da53cbb4122e5e5c278d501
Showing with 5 additions and 3 deletions.
  1. +5 −3 activerecord/lib/active_record/aggregations.rb
@@ -185,9 +185,11 @@ module ClassMethods
# to instantiate a <tt>:class_name</tt> object.
# The default is <tt>:new</tt>.
# * <tt>:converter</tt> - A symbol specifying the name of a class method of <tt>:class_name</tt>
- # or a Proc that is called when a new value is assigned to the value object. The converter is
- # passed the single value that is used in the assignment and is only called if the new value is
- # not an instance of <tt>:class_name</tt>.
+ # or a Proc that is called when a new value is assigned to the value object. Depending on its arity,
+ # the converter is passed either:
+ # * the single value that is used in the assignment
+ # * or the current object and this single value
+ # The converter is only called if the new value is not an instance of <tt>:class_name</tt>.
#
# Option examples:
# composed_of :temperature, :mapping => %w(reading celsius)

0 comments on commit 31c3e46

Please sign in to comment.