mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-08 21:06:24 +08:00
fix bug with checklists
This commit is contained in:
parent
75cc9d11df
commit
2ad4eb3488
1 changed files with 1 additions and 1 deletions
|
@ -547,7 +547,7 @@ class StepsController < ApplicationController
|
||||||
# Delete the step table
|
# Delete the step table
|
||||||
def delete_step_tables(params)
|
def delete_step_tables(params)
|
||||||
return unless params[:tables_attributes].present?
|
return unless params[:tables_attributes].present?
|
||||||
params[:tables_attributes].each do |key, table|
|
params[:tables_attributes].each do |_, table|
|
||||||
next unless table['_destroy']
|
next unless table['_destroy']
|
||||||
table_to_destroy = Table.find_by_id(table['id'])
|
table_to_destroy = Table.find_by_id(table['id'])
|
||||||
table_to_destroy.report_elements.destroy_all
|
table_to_destroy.report_elements.destroy_all
|
||||||
|
|
Loading…
Add table
Reference in a new issue