From ab2d95ff4e0ea9a832bce7ad3c322eeb0c30b640 Mon Sep 17 00:00:00 2001 From: Braulio Bhavamitra Date: Sat, 12 Sep 2015 11:39:32 -0300 Subject: [PATCH] rails4: simbolize keys on full hash assign --- lib/acts_as_having_settings.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/acts_as_having_settings.rb b/lib/acts_as_having_settings.rb index 54434fe..2ea18f1 100644 --- a/lib/acts_as_having_settings.rb +++ b/lib/acts_as_having_settings.rb @@ -13,7 +13,9 @@ module ActiveRecord end class Hash < Value def cast_value value - ::Hash[value] + h = ::Hash[value] + h.symbolize_keys! + h end end end -- libgit2 0.21.2