Sha256: 3a77e9eaf5754353dedb62ad683f0eac07c50f5573c8a4c6d42855bcba3bc611
Contents?: true
Size: 448 Bytes
Versions: 34
Compression:
Stored size: 448 Bytes
Contents
# frozen_string_literal: true module Spree class Property < Spree::Base 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
34 entries across 34 versions & 2 rubygems