Sha256: 146cb2def5883e25aa7bd853793efe1e174b9f1af12f1a948353d96080694b44

Contents?: true

Size: 355 Bytes

Versions: 22

Compression:

Stored size: 355 Bytes

Contents

class ProductProperty < ActiveRecord::Base
  belongs_to :product
  belongs_to :property
  
  validates_presence_of :property
  
  # 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

Version data entries

22 entries across 22 versions & 3 rubygems

Version Path
kdmny-spree-0.0.1 app/models/product_property.rb
spree-0.11.4 app/models/product_property.rb
spree-0.11.3 app/models/product_property.rb
spree-0.11.2 app/models/product_property.rb
spree-0.11.1 app/models/product_property.rb
spree-0.11.0 app/models/product_property.rb
spree-0.10.2 app/models/product_property.rb
spree-0.10.1 app/models/product_property.rb
spree-0.10.0 app/models/product_property.rb
spree-0.10.0.beta app/models/product_property.rb
spree-enriquez-0.9.4 app/models/product_property.rb
spree-0.9.4 app/models/product_property.rb
spree-0.9.3 app/models/product_property.rb
spree-0.9.2 app/models/product_property.rb
spree-0.9.1 app/models/product_property.rb
spree-0.9.0 app/models/product_property.rb
spree-0.8.4 app/models/product_property.rb
spree-0.8.5 app/models/product_property.rb
spree-0.8.0 app/models/product_property.rb
spree-0.8.1 app/models/product_property.rb