aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorcedricnjanga2018-03-02 08:31:25 -0800
committercedricnjanga2018-03-02 08:31:25 -0800
commit76ef38d1fb02eca90fe8097b6416fcae731ea7b0 (patch)
treeae5e4d36465bbe4f3879195ef26d31de1a760518
parent3887b07104aac0e7aaa8263bc1d6564eeae0edc4 (diff)
downloadchouette-core-76ef38d1fb02eca90fe8097b6416fcae731ea7b0.tar.bz2
Refs #3562 Take review into account and clean a little bit
-rw-r--r--app/controllers/workbenches_controller.rb4
-rw-r--r--app/views/workbenches/_form.html.slim4
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