mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
Fix Ship Order Button: requested changes
- bypass rubocop class lines limit
This commit is contained in:
committed by
Sigmund Petersen
parent
271d50e5ab
commit
6575ad738b
@@ -164,6 +164,7 @@ Metrics/ClassLength:
|
||||
- 'app/models/spree/user.rb'
|
||||
- 'app/models/spree/variant.rb'
|
||||
- 'app/models/spree/zone.rb'
|
||||
- 'app/reflexes/admin/orders_reflex.rb'
|
||||
- 'app/reflexes/products_reflex.rb'
|
||||
- 'app/serializers/api/cached_enterprise_serializer.rb'
|
||||
- 'app/serializers/api/enterprise_shopfront_serializer.rb'
|
||||
|
||||
@@ -21,7 +21,8 @@ module Admin
|
||||
def ship
|
||||
@order.send_shipment_email = false unless params[:send_shipment_email]
|
||||
if @order.ship
|
||||
return set_param_for_controller if Regexp.union(Constants::PATHS).match? request.url
|
||||
paths = %w[edit customer payments adjustments invoices return_authorizations].freeze
|
||||
return set_param_for_controller if Regexp.union(paths).match? request.url
|
||||
|
||||
morph dom_id(@order), render(partial: "spree/admin/orders/table_row",
|
||||
locals: { order: @order.reload, success: true })
|
||||
@@ -134,8 +135,4 @@ module Admin
|
||||
morph_admin_flashes
|
||||
end
|
||||
end
|
||||
|
||||
module Constants
|
||||
PATHS = %w[edit customer payments adjustments invoices return_authorizations].freeze
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user