RubyGems Navigation menu

nextable 0.0.2

Allows "walking" of a table of ActiveRecord records by implementing #next_record and #previous_record. Options: - field: [Defaults to 'id'] which field should be used to calculate order. If two records have the same value for the specified field, records will be sub-ordered by ID. - cycle: [Defaults to false] upon reaching last (or first) record in order, determines whether or not it should return nil or cycle to beginning (or end) - filters: [Defaults to {}] a hash passed to self.class.where to determine scope. This will break if the ActiveRecord object does not have all of the keys that are passed into the hash.

Gemfile:
=

install:
=

Versions:

  1. 0.1.0 February 24, 2016 (451 KB)
  2. 0.0.11 February 19, 2016 (59 KB)
  3. 0.0.10 February 19, 2016 (59 KB)
  4. 0.0.9 February 19, 2016 (57.5 KB)
  5. 0.0.8 February 19, 2016 (57.5 KB)
  6. 0.0.2 January 22, 2016 (70 KB)
Show all versions (12 total)

Runtime Dependencies (1):

rails >= 4.1.14, ~> 4.1

Development Dependencies (1):

sqlite3 >= 0

Owners:

Authors:

  • Thomas Brigham

SHA 256 checksum:

=

Total downloads 23,428

For this version 2,033

Version Released:

License:

MIT

Required Ruby Version: >= 0

Links: