diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-08-14 10:49:50 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-08-14 10:49:50 -0300 |
commit | 3d747a56b76ae97645dd265cc75e73e5f7827193 (patch) | |
tree | 75c61e9a8a243c0f55aa64f7e627306b617f2b64 | |
parent | 5dcbca25cef8e8f5809913977cfeb4366c8b44d0 (diff) | |
download | rails-3d747a56b76ae97645dd265cc75e73e5f7827193.tar.gz rails-3d747a56b76ae97645dd265cc75e73e5f7827193.tar.bz2 rails-3d747a56b76ae97645dd265cc75e73e5f7827193.zip |
Accept Arel::Value in hash values and treat them properly.
-rw-r--r-- | lib/arel/algebra/relations/relation.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/arel/algebra/relations/relation.rb b/lib/arel/algebra/relations/relation.rb index 9fdac26528..5403e40fae 100644 --- a/lib/arel/algebra/relations/relation.rb +++ b/lib/arel/algebra/relations/relation.rb @@ -110,7 +110,7 @@ module Arel private def matching_attributes(attribute) (@matching_attributes ||= attributes.inject({}) do |hash, a| - (hash[a.root] ||= []) << a + (hash[a.is_a?(Value) ? a.value : a.root] ||= []) << a hash end)[attribute.root] || [] end |