Class: BabySqueel::JoinDependency::Injector
- Inherits:
-
Array
- Object
- Array
- BabySqueel::JoinDependency::Injector
- Defined in:
- lib/baby_squeel/join_dependency.rb
Overview
This class allows BabySqueel to slip custom joins_values into Active Record’s JoinDependency
Instance Method Summary collapse
-
#group_by ⇒ Object
Active Record will call group_by on this object in ActiveRecord::QueryMethods#build_joins.
Instance Method Details
#group_by ⇒ Object
Active Record will call group_by on this object in ActiveRecord::QueryMethods#build_joins. This allows BabySqueel::Joins to be treated like typical join hashes until Polyamorous can deal with them.
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/baby_squeel/join_dependency.rb', line 13 def group_by super do |join| case join when BabySqueel::Join :association_join else yield join end end end |