aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/algebra/extensions/array.rb
diff options
context:
space:
mode:
authorBryan Helmkamp <bryan@brynary.com>2009-05-17 14:31:04 -0400
committerBryan Helmkamp <bryan@brynary.com>2009-05-17 14:31:04 -0400
commit7032a50297fce4d7724d1735e81e5df5fd919e71 (patch)
treec52333abcc7a1454ea6ada7fe5e31e054f4e9540 /lib/arel/algebra/extensions/array.rb
parentbdca9ed42ffea10aa6989ea3ecebedb424fa01ed (diff)
downloadrails-7032a50297fce4d7724d1735e81e5df5fd919e71.tar.gz
rails-7032a50297fce4d7724d1735e81e5df5fd919e71.tar.bz2
rails-7032a50297fce4d7724d1735e81e5df5fd919e71.zip
reorganized file structures
Conflicts: lib/arel.rb lib/arel/arel.rb lib/arel/engines/memory/predicates.rb lib/arel/engines/memory/relations/array.rb lib/arel/engines/sql/relations/table.rb
Diffstat (limited to 'lib/arel/algebra/extensions/array.rb')
-rw-r--r--lib/arel/algebra/extensions/array.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/algebra/extensions/array.rb b/lib/arel/algebra/extensions/array.rb
new file mode 100644
index 0000000000..5b6d6d6abd
--- /dev/null
+++ b/lib/arel/algebra/extensions/array.rb
@@ -0,0 +1,5 @@
+class Array
+ def to_hash
+ Hash[*flatten]
+ end
+end \ No newline at end of file