Method: Findable::Collection#where
- Defined in:
- lib/findable/collection.rb
#where(conditions) ⇒ Object
55 56 57 58 59 |
# File 'lib/findable/collection.rb', line 55 def where(conditions) regenerate(records.select {|record| conditions.all? {|k, v| record.public_send(k) == v } }) end |