Class: Spree::ProductProperty
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Spree::ProductProperty
- Defined in:
- app/models/spree/product_property.rb
Instance Method Summary collapse
-
#property_name ⇒ Object
virtual attributes for use with AJAX completion stuff.
- #property_name=(name) ⇒ Object
Instance Method Details
#property_name ⇒ Object
virtual attributes for use with AJAX completion stuff
12 13 14 |
# File 'app/models/spree/product_property.rb', line 12 def property_name property.name if property end |
#property_name=(name) ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'app/models/spree/product_property.rb', line 16 def property_name=(name) unless name.blank? unless property = Property.find_by_name(name) property = Property.create(:name => name, :presentation => name) end self.property = property end end |