From 65c53df2ef0541ba4c90da9ec849273afec6616e Mon Sep 17 00:00:00 2001 From: Pau Perez Date: Fri, 29 May 2020 10:21:51 +0200 Subject: [PATCH] Remove unnecessary callback invocations There are no registered callback methods to execute. --- app/controllers/admin/schedules_controller.rb | 4 ---- 1 file changed, 4 deletions(-) diff --git a/app/controllers/admin/schedules_controller.rb b/app/controllers/admin/schedules_controller.rb index a16cc673a9..35df2c4190 100644 --- a/app/controllers/admin/schedules_controller.rb +++ b/app/controllers/admin/schedules_controller.rb @@ -29,10 +29,7 @@ module Admin end def create - invoke_callbacks(:create, :before) - if params[:order_cycle_ids].blank? - invoke_callbacks(:create, :fails) return respond_with(@object) end @@ -49,7 +46,6 @@ module Admin format.js { render layout: false } end else - invoke_callbacks(:create, :fails) respond_with(@object) end end