Sha256: c002d55469bc3b57f7680ec45888381c137bd2c3236fcd28fc784360ae5baac7

Contents?: true

Size: 604 Bytes

Versions: 28

Compression:

Stored size: 604 Bytes

Contents

module Spree
  module Admin
    class PromotionsController < ResourceController
      before_filter :load_data
      before_filter :load_event_names

      helper 'spree/promotion_rules'

      protected
        def location_after_save
          spree.edit_admin_promotion_url(@promotion)
        end

        def load_data
          @calculators = Rails.application.config.spree.calculators.promotion_actions_create_adjustments
        end

        def load_event_names
          @event_names = Spree::Activator.event_names.map { |name| [Spree.t("events.#{name}"), name] }
        end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
spree_backend-2.1.12 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.11 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.10 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.0.13 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.9 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.8 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.0.12 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.7 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.0.11 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.0.10 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.6 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.5 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.0.9 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.4 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.0.8 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.3 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.0.7 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.2 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.0.6 app/controllers/spree/admin/promotions_controller.rb
spree_backend-2.1.1 app/controllers/spree/admin/promotions_controller.rb