Module: FmStore::Finders
- Defined in:
- lib/fm_store/finders.rb
Instance Method Summary collapse
- #criteria ⇒ Object
- #criteria_query ⇒ Object
-
#total ⇒ Object
Will always return an array properly cast to the correct type def find(hash_or_record_id, options = {}) where(hash_or_record_id, options) end.
Instance Method Details
#criteria ⇒ Object
18 19 20 |
# File 'lib/fm_store/finders.rb', line 18 def criteria Criteria.new(self) end |
#criteria_query ⇒ Object
22 23 24 |
# File 'lib/fm_store/finders.rb', line 22 def criteria_query Criteria.new(self, true) end |
#total ⇒ Object
Will always return an array properly cast to the correct type def find(hash_or_record_id, options = {})
where(hash_or_record_id, )
end
31 32 33 |
# File 'lib/fm_store/finders.rb', line 31 def total criteria.paginate(:per_page => 1).total_entries end |