From 3d747a56b76ae97645dd265cc75e73e5f7827193 Mon Sep 17 00:00:00 2001 From: Emilio Tagua Date: Fri, 14 Aug 2009 10:49:50 -0300 Subject: Accept Arel::Value in hash values and treat them properly. --- lib/arel/algebra/relations/relation.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') 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 -- cgit v1.2.3