Module: Squeel::Adapters::ActiveRecord::AssociationPreload
- Defined in:
- lib/squeel/adapters/active_record/3.0/association_preload.rb
Instance Method Summary collapse
Instance Method Details
#preload_associations(records, associations, preload_options = {}) ⇒ Object
6 7 8 9 10 |
# File 'lib/squeel/adapters/active_record/3.0/association_preload.rb', line 6 def preload_associations(records, associations, ={}) records = Array.wrap(records).compact.uniq return if records.empty? super(records, Visitors::SymbolVisitor.new.accept(associations), ) end |