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:
=

installieren:
=

Versionen:

  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)
Zeige alle Versionen (12 total)

Runtime Abhängigkeiten (1):

rails >= 4.1.14, ~> 4.1

Development Abhängigkeiten (1):

sqlite3 >= 0

Besitzer:

Autoren:

  • Thomas Brigham

SHA 256-Prüfsumme:

=

Downloads insgesamt 23.428

Für diese Version 2.033

Version veröffentlicht:

Lizenz:

MIT

Erforderliche Ruby-Version: >= 0

Links: