Permalink
Browse files

Accept Arel::Value in hash values and treat them properly.

  • Loading branch information...
1 parent 5dcbca2 commit 3d747a56b76ae97645dd265cc75e73e5f7827193 @miloops miloops committed Aug 14, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/arel/algebra/relations/relation.rb
@@ -110,7 +110,7 @@ def position_of(attribute)
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

0 comments on commit 3d747a5

Please sign in to comment.