Sha256: 22e9449fa6e4877bfd3a0c809f979bb2bd948eff90714b76874092ef45852364
Contents?: true
Size: 416 Bytes
Versions: 41
Compression:
Stored size: 416 Bytes
Contents
# frozen_string_literal: true module Spree module PromotionRulesHelper def options_for_promotion_rule_types(promotion) existing = promotion.rules.map { |rule| rule.class.name } rules = Rails.application.config.spree.promotions.rules.reject { |r| existing.include? r.name } options = rules.map { |rule| [rule.model_name.human, rule.name] } options_for_select(options) end end end
Version data entries
41 entries across 41 versions & 2 rubygems