lib/on_form/rails_compat.rb
# Instantiates objects for all attribute classes that needs more than one constructor parameter. This is done
# 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 Integer and
# f for Float. If all the values for a given attribute are empty, the attribute will be set to +nil+.
Instantiates objects for all attribute classes that needs more than one constructor parameter. This is done
by calling new on the column type or aggregation type (through composed_of) object with these parameters.
Instantiates objects for all attribute classes that needs more than one constructor parameter . This is done by calling new on the column type or aggregation type ( through composed_of ) object with these parameters .
def extract_callstack_for_multiparameter_attributes(pairs)
      attributes = {}
      pairs.each do |(multiparameter_name, value)|
        attribute_name = multiparameter_name.split("(").first
        attributes[attribute_name] ||= {}
        parameter_value = value.empty? ? nil : type_cast_attribute_value(multiparameter_name, value)
        attributes[attribute_name][find_parameter_position(multiparameter_name)] ||= parameter_value
      end
      attributes
    end
def extract_callstack_for_multiparameter_attributes ( pairs ) attributes = { } pairs . each do | ( multiparameter_name , value ) | attribute_name = multiparameter_name . split ( "(" ) . first attributes [ attribute_name ] ||= { } parameter_value = value . empty? ? nil : type_cast_attribute_value ( multiparameter_name , value ) attributes [ attribute_name ] [ find_parameter_position ( multiparameter_name ) ] ||= parameter_value end attributes end
Instantiates objects for all attribute classes that needs more than one constructor parameter.
Instantiates objects for all attribute classes that needs more than one constructor parameter .
pairs
<not_specific>