Skip to content

Commit

Permalink
hashes need to be bound as hashes. :'(
Browse files Browse the repository at this point in the history
  • Loading branch information
tenderlove committed Sep 22, 2010
1 parent a83eb35 commit 082a81a
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/arel/algebra/core_extensions/hash.rb
Original file line number Original file line Diff line number Diff line change
@@ -1,7 +1,11 @@
class Hash class Hash
def bind(relation) def bind(relation)
Hash[map { |key, value| 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
end end

0 comments on commit 082a81a

Please sign in to comment.