Module: BabySqueel::ActiveRecord::QueryMethods::Injector6_1
- Defined in:
- lib/baby_squeel/active_record/query_methods.rb
Overview
This class allows BabySqueel to slip custom joins_values into Active Record’s JoinDependency
Instance Method Summary collapse
Instance Method Details
#each(&block) ⇒ Object
11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/baby_squeel/active_record/query_methods.rb', line 11 def each(&block) super do |join| if join.is_a?(BabySqueel::Join) result = block.binding.local_variables.include?(:result) && block.binding.local_variable_get(:result) result << join if result join else block.call(join) end end end |