Sha256: b6aaefcf939463f05758a1760a1e238e6b952a5a9bc61e39f85e4b4dd1b0b08e
Contents?: true
Size: 723 Bytes
Versions: 29
Compression:
Stored size: 723 Bytes
Contents
module Spree module Api module V2 module Platform class PromotionRuleSerializer < BaseSerializer include ResourceSerializerConcern attribute :preferences do |promotion_rule| promotion_rule.preferences end belongs_to :promotion has_many :products, through: :product_promotion_rules, if: proc { |record| record.respond_to?(:product_promotion_rules) } has_many :users, through: :promotion_rule_users, if: proc { |record| record.respond_to?(:promotion_rule_users) } has_many :taxons, through: :promotion_rule_taxons, if: proc { |record| record.respond_to?(:promotion_rule_taxons) } end end end end end
Version data entries
29 entries across 29 versions & 3 rubygems