Remove one more responder and fix rubocop issues

This commit is contained in:
Luis Ramos
2020-03-10 15:56:08 +00:00
parent a53dc3a8c1
commit bc0a1d9bae
2 changed files with 4 additions and 5 deletions

View File

@@ -33,7 +33,6 @@ Layout/LineLength:
- app/controllers/admin/inventory_items_controller.rb
- app/controllers/admin/manager_invitations_controller.rb
- app/controllers/admin/product_import_controller.rb
- app/controllers/admin/proxy_orders_controller.rb
- app/controllers/admin/schedules_controller.rb
- app/controllers/admin/subscriptions_controller.rb
- app/controllers/admin/variant_overrides_controller.rb

View File

@@ -11,9 +11,8 @@ module Admin
if @proxy_order.cancel
render_as_json @proxy_order
else
respond_with(@proxy_order) do |format|
format.json { render json: { errors: [t('admin.proxy_orders.cancel.could_not_cancel_the_order')] }, status: :unprocessable_entity }
end
render json: { errors: [t('admin.proxy_orders.cancel.could_not_cancel_the_order')] },
status: :unprocessable_entity
end
end
@@ -21,7 +20,8 @@ module Admin
if @proxy_order.resume
render_as_json @proxy_order
else
render json: { errors: [t('admin.proxy_orders.resume.could_not_resume_the_order')] }, status: :unprocessable_entity
render json: { errors: [t('admin.proxy_orders.resume.could_not_resume_the_order')] },
status: :unprocessable_entity
end
end
end