aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorEmilio Tagua <miloops@gmail.com>2009-08-14 10:49:50 -0300
committerEmilio Tagua <miloops@gmail.com>2009-08-14 10:49:50 -0300
commit3d747a56b76ae97645dd265cc75e73e5f7827193 (patch)
tree75c61e9a8a243c0f55aa64f7e627306b617f2b64 /lib
parent5dcbca25cef8e8f5809913977cfeb4366c8b44d0 (diff)
downloadrails-3d747a56b76ae97645dd265cc75e73e5f7827193.tar.gz
rails-3d747a56b76ae97645dd265cc75e73e5f7827193.tar.bz2
rails-3d747a56b76ae97645dd265cc75e73e5f7827193.zip
Accept Arel::Value in hash values and treat them properly.
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/algebra/relations/relation.rb2
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