Module: Nextable
- Includes:
- DB
- Defined in:
- lib/nextable/db.rb,
lib/nextable.rb
Overview
This module adds records that allow sane comparisons of values, mostly in the realm of downcasing string fields.
Defined Under Namespace
Modules: DB
Instance Method Summary collapse
Instance Method Details
#next_record(opts = {}) ⇒ Object
19 20 21 22 23 |
# File 'lib/nextable.rb', line 19 def next_record(opts = {}) initialize!(opts) return pick_next_record if @field == 'id' pick_next_record_for_field end |
#previous_record(opts = {}) ⇒ Object
25 26 27 28 29 |
# File 'lib/nextable.rb', line 25 def previous_record(opts = {}) initialize!(opts) return pick_previous_record if @field == 'id' pick_previous_record_for_field end |