Sha256: 41fcf3a7a4d354ab37b2168d84fd584057bed97dfc202637eb10222145c8950f
Contents?: true
Size: 439 Bytes
Versions: 10
Compression:
Stored size: 439 Bytes
Contents
module Spree class ProductProperty < ActiveRecord::Base belongs_to :product belongs_to :property validates :property, :presence => true validates_length_of :value, :maximum => 255 # virtual attributes for use with AJAX completion stuff def property_name property.name if property end def property_name=(name) self.property = Property.find_by_name(name) unless name.blank? end end end
Version data entries
10 entries across 10 versions & 1 rubygems