Class: ShopVariant

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/shop_variant.rb

Instance Method Summary collapse

Instance Method Details

#optionsObject



10
11
12
13
14
15
16
17
# File 'app/models/shop_variant.rb', line 10

def options
  options = {}
  if self.options_json.present?
    options = ActiveSupport::JSON.decode(self.options_json)
    options = Forms::Config.deep_symbolize_keys(options)
  end
  options
end

#options=(options) ⇒ Object



19
20
21
# File 'app/models/shop_variant.rb', line 19

def options=(options)
  self.options_json = ActiveSupport::JSON.encode(options)
end