Skip to content

Commit

Permalink
Accept Arel::Value in hash values and treat them properly.
Browse files Browse the repository at this point in the history
  • Loading branch information
miloops committed Aug 14, 2009
1 parent 5dcbca2 commit 3d747a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/arel/algebra/relations/relation.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3d747a5

Please sign in to comment.