aboutsummaryrefslogtreecommitdiffstats
path: root/app/controllers/referentials_controller.rb
diff options
context:
space:
mode:
authorGuillaume2017-11-06 12:43:49 +0100
committerGuillaume2017-11-06 12:43:49 +0100
commit59ef4a2d56035d5832a6fd9aeeb042f4ba544dea (patch)
tree4bf9b16670ec4ec53a47d6f8d3242e8c4f002afc /app/controllers/referentials_controller.rb
parenta9216c0457f81c9c27f6ec5d3100941b68ddf9e4 (diff)
downloadchouette-core-59ef4a2d56035d5832a6fd9aeeb042f4ba544dea.tar.bz2
add validate method in referentials_controller for call ComplianceControlSetCopyWorker, and change routes/views for select compliance_control_set
Diffstat (limited to 'app/controllers/referentials_controller.rb')
-rw-r--r--app/controllers/referentials_controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/app/controllers/referentials_controller.rb b/app/controllers/referentials_controller.rb
index 6b479e938..b08f58514 100644
--- a/app/controllers/referentials_controller.rb
+++ b/app/controllers/referentials_controller.rb
@@ -54,6 +54,16 @@ class ReferentialsController < InheritedResources::Base
end
end
+ def select_compliance_control_set
+ @compliance_control_sets = ComplianceControlSet.all
+ end
+
+ def validate
+ ComplianceControlSetCopyWorker.perform_async(params[:compliance_control_set], params[:id])
+ flash[:notice] = I18n.t("referentials.operation_in_progress")
+ redirect_to(referential_path)
+ end
+
def destroy
workbench = referential.workbench_id