Sha256: bcb89a91c60ed0a21d6b6777aa6398c3cd5209e506276b629ed163cdc25d54b0

Contents?: true

Size: 507 Bytes

Versions: 28

Compression:

Stored size: 507 Bytes

Contents

module Workarea
  module Admin
    class SegmentOverridesController < Admin::ApplicationController
      def show
      end

      def create
        segment_ids = params[:segment_ids].to_h.select { |_, v| v =~ /true/ }.keys
        self.override_segments = Segment.in(id: segment_ids)

        if params[:return_to].present?
          redirect_to URI.parse(params[:return_to]).request_uri
        else
          redirect_back fallback_location: storefront.root_path
        end
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
workarea-admin-3.5.27 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.26 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.25 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.23 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.22 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.21 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.20 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.19 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.18 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.17 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.16 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.15 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.14 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.13 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.12 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.11 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.10 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.9 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.8 app/controllers/workarea/admin/segment_overrides_controller.rb
workarea-admin-3.5.7 app/controllers/workarea/admin/segment_overrides_controller.rb