Class: ActiveForce::Association::BuildFromArray
- Inherits:
-
AbstractBuildFrom
- Object
- AbstractBuildFrom
- ActiveForce::Association::BuildFromArray
- Defined in:
- lib/active_force/association/relation_model_builder.rb
Direct Known Subclasses
Instance Attribute Summary
Attributes inherited from AbstractBuildFrom
#association, #association_mapping, #value
Instance Method Summary collapse
Methods inherited from AbstractBuildFrom
Constructor Details
This class inherits a constructor from ActiveForce::Association::AbstractBuildFrom
Instance Method Details
#call ⇒ Object
52 53 54 55 56 57 58 |
# File 'lib/active_force/association/relation_model_builder.rb', line 52 def call if association.is_a?(HasOneAssociation) association.build(value.first, association_mapping) else value.map { |mash| association.build(mash, association_mapping) } end end |