Module: Uberloader::QueryMethods::Delegates
- Defined in:
- lib/uberloader/query_methods.rb
Instance Method Summary collapse
-
#uberload(association, scope: nil) {|Uberloader::Context| ... } ⇒ ActiveRecord::Relation
Uberload an association.
Instance Method Details
#uberload(association, scope: nil) {|Uberloader::Context| ... } ⇒ ActiveRecord::Relation
Uberload an association.
Category.
uberload(:widget, scope: Widget.order(:name)) { |u|
u.uberload(:parts) {
u.scope Part.active
u.uberload(:foo)
}
}
20 21 22 |
# File 'lib/uberloader/query_methods.rb', line 20 def uberload(association, scope: nil, &block) all.uberload(association, scope: scope, &block) end |