From 53915c5c54c06182717b457375ae771ee01558fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matija=20=C4=8Cupi=C4=87?= Date: Sat, 17 Mar 2018 12:17:40 +0100 Subject: Alias secret_key and secret_value to key and value --- app/controllers/projects/variables_controller.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'app/controllers/projects/variables_controller.rb') diff --git a/app/controllers/projects/variables_controller.rb b/app/controllers/projects/variables_controller.rb index 3cbfe7b3cc1..ffe93522ca6 100644 --- a/app/controllers/projects/variables_controller.rb +++ b/app/controllers/projects/variables_controller.rb @@ -32,12 +32,7 @@ class Projects::VariablesController < Projects::ApplicationController end def variables_params - filtered_params = params.permit(variables_attributes: [*variable_params_attributes]) - filtered_params["variables_attributes"].each do |variable| - variable["key"] = variable.delete("secret_key") - variable["value"] = variable.delete("secret_value") - end - filtered_params + params.permit(variables_attributes: [*variable_params_attributes]) end def variable_params_attributes -- cgit v1.2.1