Sha256: fe4d3e3785c93eb8642dc0dbc80efaf2e2320d39cd11f6c406f22b0f9f732568

Contents?: true

Size: 1.16 KB

Versions: 35

Compression:

Stored size: 1.16 KB

Contents

= New Feature

* An enum plugin has been added.  This plugin allows you to create
  model-level enums, giving names to underlying values of a column.
  For example:

    Album.plugin :enum
    Album.enum :status_id, good: 1, bad: 2

  Adds Album#good! and Album#bad! for changing the status_id to 1 or 
  2 respectively.  It adds Album#good? and Album#bad? for checking
  whether the status_id is 1 or 2 respectively.  It overrides
  Album#status_id to return :good or :bad instead of 1 or 2,
  respectively, and overrides Album#status_id= to accept :good or
  :bad instead of 1 or 2 respectively.

  Additionally, it adds good and bad dataset methods for filtering
  the model's dataset to records where status_id is 1 or 2
  respectively. It also adds not_good and not_bad dataset methods
  for filtering the model's dataset to records where status_id is not
  1 or not 2 respectively.

  You can use :prefix and :suffix options when calling enum to
  add a prefix or suffix to the method names created.  You can
  set the :override_accessors option to false to not override
  the accessor methods for the column, and set the :dataset_methods
  option to false to not add dataset methods.

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
sequel-5.83.1 doc/release_notes/5.54.0.txt
sequel-5.83.0 doc/release_notes/5.54.0.txt
sequel-5.82.0 doc/release_notes/5.54.0.txt
sequel-5.81.0 doc/release_notes/5.54.0.txt
sequel-5.80.0 doc/release_notes/5.54.0.txt
sequel-5.79.0 doc/release_notes/5.54.0.txt
sequel-5.78.0 doc/release_notes/5.54.0.txt
sequel-5.77.0 doc/release_notes/5.54.0.txt
sequel-5.76.0 doc/release_notes/5.54.0.txt
sequel-5.75.0 doc/release_notes/5.54.0.txt
sequel-5.74.0 doc/release_notes/5.54.0.txt
sequel-5.73.0 doc/release_notes/5.54.0.txt
sequel-5.72.0 doc/release_notes/5.54.0.txt
sequel-5.71.0 doc/release_notes/5.54.0.txt
sequel-5.70.0 doc/release_notes/5.54.0.txt
sequel-5.69.0 doc/release_notes/5.54.0.txt
sequel-5.68.0 doc/release_notes/5.54.0.txt
sequel-5.67.0 doc/release_notes/5.54.0.txt
sequel-5.66.0 doc/release_notes/5.54.0.txt
sequel-5.65.0 doc/release_notes/5.54.0.txt