Fix lingering buglet (would not even run with Array)
This commit is contained in:
parent
c6b8b85f1f
commit
6bf693e0ee
1 changed files with 1 additions and 1 deletions
|
@ -246,7 +246,7 @@ class FoodsoftConfig
|
||||||
|
|
||||||
# Normalize value recursively (which can be entered as strings, but we want to store it properly)
|
# Normalize value recursively (which can be entered as strings, but we want to store it properly)
|
||||||
def normalize_value(value)
|
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
|
if value.is_a? Hash
|
||||||
value = ActiveSupport::HashWithIndifferentAccess[ value.to_a.map{|a| [a[0], normalize_value(a[1])]} ]
|
value = ActiveSupport::HashWithIndifferentAccess[ value.to_a.map{|a| [a[0], normalize_value(a[1])]} ]
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue