Class: Shoppy::OptionsGroup

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

Direct Known Subclasses

OptionsGroup

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#items_stringObject

temp. Attrinbutes



22
23
24
# File 'app/models/shoppy/options_group.rb', line 22

def items_string
  @items_string
end

Instance Method Details

#nameObject

Validators



9
# File 'app/models/shoppy/options_group.rb', line 9

validates :name,      presence: true

#options_itemsObject

Relationships



4
# File 'app/models/shoppy/options_group.rb', line 4

has_many :options_items, dependent: :destroy

#optionsItemsObject



25
26
27
# File 'app/models/shoppy/options_group.rb', line 25

def optionsItems
  return OptionsHelper::items_to_string(self)
end

#optionsItems=(options_items) ⇒ Object



29
30
31
# File 'app/models/shoppy/options_group.rb', line 29

def optionsItems=(options_items)
  @items_string = options_items
end