diff options
Diffstat (limited to 'lib/arel/engines/memory/relations/array.rb')
-rw-r--r-- | lib/arel/engines/memory/relations/array.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/arel/engines/memory/relations/array.rb b/lib/arel/engines/memory/relations/array.rb index 6486dcbcc1..d8751fa626 100644 --- a/lib/arel/engines/memory/relations/array.rb +++ b/lib/arel/engines/memory/relations/array.rb @@ -15,9 +15,12 @@ module Arel end def attributes - @attributes ||= @attribute_names_and_types.collect do |attribute, type| - attribute = type.new(self, attribute) if Symbol === attribute - attribute + @attributes ||= begin + attrs = @attribute_names_and_types.collect do |attribute, type| + attribute = type.new(self, attribute) if Symbol === attribute + attribute + end + Header.new(attrs) end end |