Skip to content
Browse files

Typecast to string and array are not supported in multiparameter

attributes
  • Loading branch information...
1 parent d88b65f commit ae7f109cce040746cebada0dd01f80071eace1f1 @rafaelfranca rafaelfranca committed Oct 18, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 activerecord/lib/active_record/attribute_assignment.rb
View
5 activerecord/lib/active_record/attribute_assignment.rb
@@ -57,9 +57,8 @@ def assign_nested_parameter_attributes(pairs)
# by calling new on the column type or aggregation type (through composed_of) object with these parameters.
# So having the pairs written_on(1) = "2004", written_on(2) = "6", written_on(3) = "24", will instantiate
# written_on (a date type) with Date.new("2004", "6", "24"). You can also specify a typecast character in the
- # parentheses to have the parameters typecasted before they're used in the constructor. Use i for Fixnum,
- # f for Float, s for String, and a for Array. If all the values for a given attribute are empty, the
- # attribute will be set to +nil+.
+ # parentheses to have the parameters typecasted before they're used in the constructor. Use i for Fixnum and
+ # f for Float. If all the values for a given attribute are empty, the attribute will be set to +nil+.
def assign_multiparameter_attributes(pairs)
execute_callstack_for_multiparameter_attributes(
extract_callstack_for_multiparameter_attributes(pairs)

0 comments on commit ae7f109

Please sign in to comment.
Something went wrong with that request. Please try again.