Sha256: 06a78120db5d9f434e7e49e4dedb7ad39d74f58b75c641fe0e061a06de6d14cd
Contents?: true
Size: 426 Bytes
Versions: 2
Compression:
Stored size: 426 Bytes
Contents
# frozen_string_literal: true module SolidusLegacyPromotions module SpreePromotionCodeBatchDecorator def process if state == "pending" update!(state: "processing") Spree::PromotionCodeBatchJob.perform_later(self) else raise Spree::PromotionCodeBatch::CantProcessStartedBatch.new("Batch #{id} already started") end end Spree::PromotionCodeBatch.prepend(self) end end
Version data entries
2 entries across 2 versions & 1 rubygems