Sha256: 6d63e251a708103eafe1aed22647c9b912be3c5849e36a297c1c9f047df92832
Contents?: true
Size: 797 Bytes
Versions: 1
Compression:
Stored size: 797 Bytes
Contents
class ShopDiscountablesDataset < Dataset::Base uses :shop_discounts, :shop_categories, :shop_products def load create_record :shop_discountables, :ten_percent_bread, :discount_id => shop_discounts(:ten_percent).id, :discounted_id => shop_categories(:bread).id, :discounted_type => 'ShopCategory' create_record :shop_discountables, :five_percent_bread, :discount_id => shop_discounts(:five_percent).id, :discounted_id => shop_categories(:bread).id, :discounted_type => 'ShopCategory' create_record :shop_discountables, :five_percent_crusty_bread, :discount_id => shop_discounts(:five_percent).id, :discounted_id => shop_products(:crusty_bread).id, :discounted_type => 'ShopProduct' end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
radiant-shop-extension-0.11.6 | spec/datasets/shop_discountables.rb |