Class: Shoppy::Variant
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Shoppy::Variant
- Includes:
- Concerns::Models::Hashable, Concerns::Models::Optionable, Concerns::Models::Promotional
- Defined in:
- app/models/shoppy/variant.rb
Direct Known Subclasses
Instance Method Summary collapse
-
#name ⇒ Object
Validators.
-
#product ⇒ Object
Relationships.
- #variant_details ⇒ Object
Instance Method Details
#name ⇒ Object
Validators
20 |
# File 'app/models/shoppy/variant.rb', line 20 validates :name, presence: true |
#product ⇒ Object
Relationships
4 |
# File 'app/models/shoppy/variant.rb', line 4 belongs_to :product |
#variant_details ⇒ Object
25 26 27 |
# File 'app/models/shoppy/variant.rb', line 25 def variant_details "#{self.name} - #{self.price}" end |