From 1eb892a4734b5f1e2d80e4733e02a3d81799b32c Mon Sep 17 00:00:00 2001 From: Matt Rogers Date: Sat, 3 Nov 2018 15:00:00 -0500 Subject: [PATCH] Don't convert ActionController::Parameters to a hash Co-Authored-By: Dan Rice --- lib/tracks/attribute_handler.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/tracks/attribute_handler.rb b/lib/tracks/attribute_handler.rb index 673dc017..de50c965 100644 --- a/lib/tracks/attribute_handler.rb +++ b/lib/tracks/attribute_handler.rb @@ -108,7 +108,7 @@ module Tracks def normalize(attributes) # make sure the hash keys are all symbols - Hash[attributes.map{|k,v| [k.to_sym,v]}] + attributes.transform_keys(&:to_sym) end def safe_attributes @@ -136,4 +136,4 @@ module Tracks end -end \ No newline at end of file +end