Sha256: 8be45cd1288e4937dc696221a174e421084fdf070a88fd0ad6efc42327db9f10
Contents?: true
Size: 483 Bytes
Versions: 5
Compression:
Stored size: 483 Bytes
Contents
module Spree class ProductProperty < ActiveRecord::Base belongs_to :product belongs_to :property validates :property, :presence => true validates_length_of :value, :maximum => 255 attr_accessible :property_name, :value # 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
5 entries across 5 versions & 1 rubygems