Sha256: 2fb45f651c93473f916f7d53ac067e9c7d7358043a56925fece4929dd7360ab7
Contents?: true
Size: 435 Bytes
Versions: 1
Compression:
Stored size: 435 Bytes
Contents
module ShopDiscounts module Models module CategoryDiscountable def self.included(base) base.class_eval do has_many :discountables, :class_name => 'ShopDiscountableCategory', :foreign_key => :discounted_id, :dependent => :destroy has_many :discounts, :class_name => 'ShopDiscount', :through => :discountables end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radiant-shop_discounts-extension-0.0.11 | lib/shop_discounts/models/category_discountable.rb |