app/presenters/theme_presentation.rb in woople-theme-0.2.41 vs app/presenters/theme_presentation.rb in woople-theme-0.2.42
- old
+ new
@@ -24,10 +24,14 @@
private
def self.normalize(data)
if data.is_a? Hash
- OpenStruct.new(data)
+ hash = {}
+ data.each { |key, value| hash[key] = normalize value }
+ OpenStruct.new hash
+ elsif data.is_a? Array
+ data.collect { |datum| normalize datum }
else
data
end
end