Sha256: 548812dff9dc24955d9fa959d1aa5f87b55bedbba8e2aed79f9f5acf181f428a
Contents?: true
Size: 553 Bytes
Versions: 8
Compression:
Stored size: 553 Bytes
Contents
class Admin::PromotionsController < Admin::ResourceController before_filter :load_data protected def build_resource @promotion = Promotion.new(params[:promotion]) if params[:promotion] && params[:promotion][:calculator_type] @promotion.calculator = params[:promotion][:calculator_type].constantize.new end @promotion end def location_after_save edit_admin_promotion_url(@promotion) end def load_data @calculators = Rails.application.config.spree.calculators.promotion_actions_create_adjustments end end
Version data entries
8 entries across 8 versions & 1 rubygems