lib/immoscout/models/concerns/renderable.rb in immoscout-1.5.0 vs lib/immoscout/models/concerns/renderable.rb in immoscout-1.6.0

- old
+ new

@@ -40,10 +40,10 @@ # use :alias instead of key as json-key property = value.fetch(:alias, key) # use :default if present AND value is nil rendered = send(key) || value.fetch(:default, nil) - memo[property] = \ + memo[property] = if rendered.is_a?(Array) rendered.map do |elem| elem.try(:as_json) || elem end else