Sha256: 2bcde586d454959cc59551d8ecce17a65729d796116cd8390075b55c24b0ceff
Contents?: true
Size: 508 Bytes
Versions: 24
Compression:
Stored size: 508 Bytes
Contents
module Spree class Property < Spree::Base has_many :property_prototypes has_many :prototypes, through: :property_prototypes has_many :product_properties, dependent: :delete_all, inverse_of: :property has_many :products, through: :product_properties validates :name, :presentation, presence: true scope :sorted, -> { order(:name) } after_touch :touch_all_products private def touch_all_products products.update_all(updated_at: Time.current) end end end
Version data entries
24 entries across 24 versions & 1 rubygems