From 4afaa50ce0c814292017d836a32a3fba939883b6 Mon Sep 17 00:00:00 2001 From: zmagod Date: Thu, 1 Sep 2016 13:49:12 +0200 Subject: [PATCH] fixed multiple tables check --- app/controllers/steps_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/steps_controller.rb b/app/controllers/steps_controller.rb index a098d0515..1d06edc96 100644 --- a/app/controllers/steps_controller.rb +++ b/app/controllers/steps_controller.rb @@ -520,7 +520,7 @@ class StepsController < ApplicationController def delete_step_tables(params) return unless params[:tables_attributes].present? params[:tables_attributes].each do |table| - next unless table.second['_destroy'] != 1 + next unless table.second['_destroy'] table_to_destroy = Table.find_by(id: table.second['id']) table_to_destroy.report_elements.destroy_all end