Slide 52
Slide 52 text
RUBY DAY 2020 DmitryTsepelev
@dmitrytsepelev 52
store_model
https:"//github.com/DmitryTsepelev/store_model
class Configuration
include StoreModel"::Model
attribute :model, :string
enum :status, %i[active archived], default: :active
validates :status, presence: true
end
class Product < ApplicationRecord
attribute :configuration, Configuration.to_type
validates :configuration, store_model: true
end