Sha256: de8c45975d454632ae9bd945bef132cee056ccb7ed3df6797273c67eac9aa53e

Contents?: true

Size: 414 Bytes

Versions: 67

Compression:

Stored size: 414 Bytes

Contents

module Spree
  module Admin
    class StockLocationsController < ResourceController
      before_action :set_country, only: :new

      private

      def set_country
        @stock_location.country = Spree::Country.default
      rescue ActiveRecord::RecordNotFound
        flash[:error] = Spree.t(:stock_locations_need_a_default_country)
        redirect_to admin_stock_locations_path
      end
    end
  end
end

Version data entries

67 entries across 67 versions & 1 rubygems

Version Path
spree_backend-3.1.10 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.4.0.rc1 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.3.2 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.2.5 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.1.9 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.3.1 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.2.4 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.1.8 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.3.0 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.3.0.rc4 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.3.0.rc3 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.1.7 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.2.3 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.2.2 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.3.0.rc2 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.1.6 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.3.0.rc1 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.1.5 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.2.1 app/controllers/spree/admin/stock_locations_controller.rb
spree_backend-3.2.0 app/controllers/spree/admin/stock_locations_controller.rb