Module: BabySqueel::ActiveRecord::QueryMethods

Defined in:
lib/baby_squeel/active_record/query_methods.rb

Instance Method Summary collapse

Instance Method Details

#grouping(&block) ⇒ Object

Constructs Arel for ActiveRecord::QueryMethods#group using the DSL.



28
29
30
# File 'lib/baby_squeel/active_record/query_methods.rb', line 28

def grouping(&block)
  group DSL.evaluate(self, &block)
end

#joining(&block) ⇒ Object

Constructs Arel for ActiveRecord::QueryMethods#joins using the DSL.



8
9
10
# File 'lib/baby_squeel/active_record/query_methods.rb', line 8

def joining(&block)
  joins DSL.evaluate(self, &block)
end

#ordering(&block) ⇒ Object

Constructs Arel for ActiveRecord::QueryMethods#order using the DSL.



18
19
20
# File 'lib/baby_squeel/active_record/query_methods.rb', line 18

def ordering(&block)
  order DSL.evaluate(self, &block)
end

#reordering(&block) ⇒ Object

Constructs Arel for ActiveRecord::QueryMethods#reorder using the DSL.



23
24
25
# File 'lib/baby_squeel/active_record/query_methods.rb', line 23

def reordering(&block)
  reorder DSL.evaluate(self, &block)
end

#selecting(&block) ⇒ Object

Constructs Arel for ActiveRecord::QueryMethods#select using the DSL.



13
14
15
# File 'lib/baby_squeel/active_record/query_methods.rb', line 13

def selecting(&block)
  select DSL.evaluate(self, &block)
end

#when_having(&block) ⇒ Object

Constructs Arel for ActiveRecord::QueryMethods#having using the DSL.



33
34
35
# File 'lib/baby_squeel/active_record/query_methods.rb', line 33

def when_having(&block)
  having DSL.evaluate(self, &block)
end