Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

hashes need to be bound as hashes. :'(

  • Loading branch information...
commit 082a81aa2db7859697115c3d1a23ff91fcfa5c6a 1 parent a83eb35
@tenderlove tenderlove authored
Showing with 5 additions and 1 deletion.
  1. +5 −1 lib/arel/algebra/core_extensions/hash.rb
View
6 lib/arel/algebra/core_extensions/hash.rb
@@ -1,7 +1,11 @@
class Hash
def bind(relation)
Hash[map { |key, value|
- [key.bind(relation), value.bind(relation)]
+ value = Hash === value ?
+ Arel::Value.new(value, relation) :
+ value.bind(relation)
+
+ [key.bind(relation), value]
}]
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.