Skip to content

Commit

Permalink
kennyadsl/fix-missing-action: [wip]
Browse files Browse the repository at this point in the history
  • Loading branch information
elia committed Dec 22, 2023
1 parent b95f2dd commit 0f4ec58
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Api
class CustomerReturnsController < Spree::Api::BaseController
before_action :load_order
before_action :build_customer_return, only: [:create]
around_action :lock_order, only: [:create, :update, :destroy, :cancel]
around_action :lock_order, only: [:create, :update]

rescue_from Spree::Order::InsufficientStock, with: :insufficient_stock_error

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
module Spree
module Api
class StockMovementsController < Spree::Api::BaseController
before_action :stock_location, except: [:update, :destroy]
before_action :stock_location, except: [:destroy]

def index
authorize! :index, StockMovement
Expand Down
6 changes: 6 additions & 0 deletions core/lib/spree/testing_support/dummy_app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ def self.setup(gem_root:, lib_name:, auto_migrate: true)

class Application < ::Rails::Application
config.load_defaults("#{Rails::VERSION::MAJOR}.#{Rails::VERSION::MINOR}")

if Rails.gem_version >= Gem::Version.new('7.1')
config.action_controller.raise_on_missing_callback_actions = true
config.action_dispatch.show_exceptions = :none
end

# Make the test environment more production-like:
config.action_controller.allow_forgery_protection = false
config.action_controller.default_protect_from_forgery = false
Expand Down

0 comments on commit 0f4ec58

Please sign in to comment.