Module: BabySqueel::ActiveRecord::QueryMethods
- Defined in:
- lib/baby_squeel/active_record/query_methods.rb
Instance Method Summary collapse
-
#grouping(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#group using the DSL.
-
#joining(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#joins using the DSL.
-
#ordering(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#order using the DSL.
-
#selecting(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#select using the DSL.
-
#when_having(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#having using the DSL.
Instance Method Details
#grouping(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#group using the DSL.
23 24 25 |
# File 'lib/baby_squeel/active_record/query_methods.rb', line 23 def grouping(&block) group DSL.evaluate(self, &block) end |
#joining(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#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::Base#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 |
#selecting(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#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::Base#having using the DSL.
28 29 30 |
# File 'lib/baby_squeel/active_record/query_methods.rb', line 28 def when_having(&block) having DSL.evaluate(self, &block) end |