private Method

Base.extract_callstack_for_multiparameter_attributes(pairs)

There's no documentation for this item.

Source Code

# File active_record/base.rb, line 2402
def extract_callstack_for_multiparameter_attributes(pairs)
  attributes = { }

  for pair in pairs
    multiparameter_name, value = pair
    attribute_name = multiparameter_name.split("(").first
    attributes[attribute_name] = [] unless attributes.include?(attribute_name)

    unless value.empty?
      attributes[attribute_name] <<
        [ find_parameter_position(multiparameter_name), type_cast_attribute_value(multiparameter_name, value) ]
    end
  end

  attributes.each { |name, values| attributes[name] = values.sort_by{ |v| v.first }.collect { |v| v.last } }
end
Comments

Have your say
Please use Textile formatting (click here for a cheat sheet). Use <code/> and <pre/> for code samples.
Click here to login with OpenID to to post comments.