Module: BabySqueel::ActiveRecord::WhereChain
- Defined in:
- lib/baby_squeel/active_record.rb
Instance Method Summary collapse
-
#has(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#where using the DSL.
Instance Method Details
#has(&block) ⇒ Object
Constructs Arel for ActiveRecord::Base#where using the DSL.
25 26 27 28 29 30 |
# File 'lib/baby_squeel/active_record.rb', line 25 def has(&block) opts = DSL.evaluate(@scope, &block) factory = @scope.send(:where_clause_factory) @scope.where_clause += factory.build(opts, []) @scope end |