From befff65b3e58d52f3c7c356199d69d8a1d584b6e Mon Sep 17 00:00:00 2001 From: Eisuke Oishi Date: Mon, 8 May 2017 13:58:43 +0900 Subject: [PATCH] Prevent ActionController::UnfilteredParameters error --- app/controllers/kuroko2/api/job_instances_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/kuroko2/api/job_instances_controller.rb b/app/controllers/kuroko2/api/job_instances_controller.rb index db3c1a60..0f9a2f00 100644 --- a/app/controllers/kuroko2/api/job_instances_controller.rb +++ b/app/controllers/kuroko2/api/job_instances_controller.rb @@ -3,7 +3,7 @@ class Kuroko2::Api::JobInstancesController < Kuroko2::Api::ApplicationController validates :create do hash :env, description: 'Env variables to launch an instance' do |env| - env.to_h.all? { |_, v| v.is_a?(String) } + env.values.all? { |v| v.is_a?(String) } end end