module BabySqueel::ActiveRecord::QueryMethods
Public Instance Methods
construct_join_dependency(associations, join_type)
click to toggle source
Calls superclass method
# File lib/baby_squeel/active_record/query_methods.rb, line 54 def construct_join_dependency(associations, join_type) result = super(associations, join_type) if associations.any? { |assoc| assoc.is_a?(BabySqueel::Join) } result.extend(BabySqueel::JoinDependency::Injector6_1) end result end
grouping(&block)
click to toggle source
Constructs Arel for ActiveRecord::QueryMethods#group using the DSL
.
# File lib/baby_squeel/active_record/query_methods.rb, line 45 def grouping(&block) group DSL.evaluate(self, &block) end
joining(&block)
click to toggle source
Constructs Arel for ActiveRecord::QueryMethods#joins using the DSL
.
# File lib/baby_squeel/active_record/query_methods.rb, line 25 def joining(&block) joins DSL.evaluate(self, &block) end
ordering(&block)
click to toggle source
Constructs Arel for ActiveRecord::QueryMethods#order using the DSL
.
# File lib/baby_squeel/active_record/query_methods.rb, line 35 def ordering(&block) order DSL.evaluate(self, &block) end
reordering(&block)
click to toggle source
Constructs Arel for ActiveRecord::QueryMethods#reorder using the DSL
.
# File lib/baby_squeel/active_record/query_methods.rb, line 40 def reordering(&block) reorder DSL.evaluate(self, &block) end
selecting(&block)
click to toggle source
Constructs Arel for ActiveRecord::QueryMethods#select using the DSL
.
# File lib/baby_squeel/active_record/query_methods.rb, line 30 def selecting(&block) select DSL.evaluate(self, &block) end
when_having(&block)
click to toggle source
Constructs Arel for ActiveRecord::QueryMethods#having using the DSL
.
# File lib/baby_squeel/active_record/query_methods.rb, line 50 def when_having(&block) having DSL.evaluate(self, &block) end
Private Instance Methods
select_association_list(*args)
click to toggle source
github.com/rails/rails/commit/c0c53ee9d28134757cf1418521cb97c4a135f140
Calls superclass method
# File lib/baby_squeel/active_record/query_methods.rb, line 65 def select_association_list(*args) if args[0].any? { |join| join.is_a?(BabySqueel::Join) } args[0].extend(BabySqueel::ActiveRecord::QueryMethods::Injector6_1) end super *args end