Sha256: 5152de0f1b240d577a50f7046ff798401f658cc57197313c7ebbe351357c1113

Contents?: true

Size: 371 Bytes

Versions: 2

Compression:

Stored size: 371 Bytes

Contents

module Workarea
  decorate Catalog::Product, with: :global_e do
    decorated do
      field :global_e_forbidden, type: Boolean
      embeds_many :country_exceptions,
        class_name: "Workarea::GlobalE::CountryException",
        inverse_of: :product
    end

    def global_e_forbidden
      super || (Plugin.installed?(:gift_cards) && gift_card?)
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
workarea-global_e-1.3.0 app/models/workarea/catalog/product.decorator
workarea-global_e-1.2.1 app/models/workarea/catalog/product.decorator