From 76ef38d1fb02eca90fe8097b6416fcae731ea7b0 Mon Sep 17 00:00:00 2001 From: cedricnjanga Date: Fri, 2 Mar 2018 08:31:25 -0800 Subject: Refs #3562 Take review into account and clean a little bit --- app/controllers/workbenches_controller.rb | 4 ---- app/views/workbenches/_form.html.slim | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/app/controllers/workbenches_controller.rb b/app/controllers/workbenches_controller.rb index a7786bc8b..126c27eb4 100644 --- a/app/controllers/workbenches_controller.rb +++ b/app/controllers/workbenches_controller.rb @@ -29,10 +29,6 @@ class WorkbenchesController < ChouetteController ) end - def edit - edit! - end - def delete_referentials referentials = resource.referentials.where(id: params[:referentials]) referentials.each do |referential| diff --git a/app/views/workbenches/_form.html.slim b/app/views/workbenches/_form.html.slim index 5ee17dc17..534a5f378 100644 --- a/app/views/workbenches/_form.html.slim +++ b/app/views/workbenches/_form.html.slim @@ -1,8 +1,8 @@ = simple_form_for @workbench, html: { class: 'form-horizontal', id: 'workbench_form' }, wrapper: :horizontal_form do |f| .row .col-lg-12 - = f.input :import_compliance_control_set_id, as: :select, collection: ComplianceControlSet.where(organisation: current_organisation), value_method: lambda {|t| t.id} - = f.input :merge_compliance_control_set_id, as: :select, collection: ComplianceControlSet.where(organisation: current_organisation), value_method: lambda {|t| t.id} + = f.input :import_compliance_control_set_id, as: :select, collection: current_organisation.compliance_control_sets, value_method: :id + = f.input :merge_compliance_control_set_id, as: :select, collection: current_organisation.compliance_control_sets, value_method: :id .separator -- cgit v1.2.3