sequel_enum icon indicating copy to clipboard operation
sequel_enum copied to clipboard

Feature request: support automatic scope generation

Open cmrd-senya opened this issue 7 years ago • 0 comments

ActiveRecord's enum is capable of automatically generating scopes. Would be nice to have support for the feature here too.

For instance:

class Item < Sequel::Model
  plugin :enum
  enum :condition, [:mint, :good, :poor]
end
Item.mint

equivalent to

Item.where(condition: 0)

cmrd-senya avatar Jun 29 '18 18:06 cmrd-senya