fix bug with checklists

This commit is contained in:
zmagod 2018-02-06 16:15:10 +01:00
parent 75cc9d11df
commit 2ad4eb3488

View file

@ -547,7 +547,7 @@ class StepsController < ApplicationController
# Delete the step table
def delete_step_tables(params)
return unless params[:tables_attributes].present?
params[:tables_attributes].each do |key, table|
params[:tables_attributes].each do |_, table|
next unless table['_destroy']
table_to_destroy = Table.find_by_id(table['id'])
table_to_destroy.report_elements.destroy_all