Module: Ambition::Where
- Included in:
- Ambition
- Defined in:
- lib/ambition/lib/ambition/where.rb
Instance Method Summary collapse
Instance Method Details
#detect(&block) ⇒ Object
13 14 15 |
# File 'lib/ambition/lib/ambition/where.rb', line 13 def detect(&block) select(&block).first end |
#select(*args, &block) ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'lib/ambition/lib/ambition/where.rb', line 3 def select(*args, &block) ## # XXX: AR::Base hack / workaround if args.empty? query_context.add WhereProcessor.new(self, block) else super end end |