Sha256: 68aee1e80d0474b22e58fc6edc0b0c42df358db5705192b452125a19551fb925
Contents?: true
Size: 519 Bytes
Versions: 14
Compression:
Stored size: 519 Bytes
Contents
module Configuration Enumerations.configure do |config| config.primary_key = :id config.foreign_key_suffix = :id end ::CustomEnum = Class.new(Enumerations::Base) CustomEnum.values draft: { id: 1, name: 'Draft' }, review: { id: 2, name: 'Review' }, published: { id: 3, name: 'Published', published: true } ::CustomModel = Class.new(ActiveRecord::Base) CustomModel.enumeration :custom_enum Enumerations.restore_default_configuration end
Version data entries
14 entries across 14 versions & 1 rubygems