Fix lingering buglet (would not even run with Array)

This commit is contained in:
wvengen 2015-11-14 17:07:44 +01:00
parent c6b8b85f1f
commit 6bf693e0ee
1 changed files with 1 additions and 1 deletions

View File

@ -246,7 +246,7 @@ class FoodsoftConfig
# Normalize value recursively (which can be entered as strings, but we want to store it properly)
def normalize_value(value)
value = value.map(&:normalize_value) if value.is_a? Array
value = value.map{|v| normalize_value(v)} if value.is_a? Array
if value.is_a? Hash
value = ActiveSupport::HashWithIndifferentAccess[ value.to_a.map{|a| [a[0], normalize_value(a[1])]} ]
end