Skip to content

Commit 49fb04c

Browse files
committed
Fix Admin::Orders::CustomerDetailsControllerDecorator for zeitwerk
This file has not a class defined with the same name as the filename itself. Zeitwerk does not like it.
1 parent 58d989e commit 49fb04c

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

lib/controllers/backend/spree/admin/orders/customer_details_controller_decorator.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
# frozen_string_literal: true
22

3-
Spree::Admin::Orders::CustomerDetailsController.class_eval do
4-
before_action :check_authorization
3+
module Spree::Admin::Orders::CustomerDetailsControllerDecorator
4+
def self.prepended(base)
5+
base.before_action :check_authorization
6+
end
57

68
private
79

@@ -15,4 +17,6 @@ def check_authorization
1517

1618
authorize! action, resource, session[:access_token]
1719
end
20+
21+
Spree::Admin::Orders::CustomerDetailsController.prepend self
1822
end

0 commit comments

Comments
 (0)