class OccamsRecord::EagerLoaders::HasMany
Eager loader for has_many associations.
Private Instance Methods
merge!(assoc_rows, rows)
click to toggle source
Merge
the association rows into the given rows.
@param assoc_rows [Array<OccamsRecord::Results::Row>] rows loaded from the association @param rows [Array<OccamsRecord::Results::Row>] rows loaded from the main model
# File lib/occams-record/eager_loaders/has_many.rb, line 13 def merge!(assoc_rows, rows) Merge.new(rows, name). many!(assoc_rows, {@ref.active_record_primary_key => @ref.foreign_key}) end