From 182c5a0e1f6a2268557ca43ed953d23b32e0483f Mon Sep 17 00:00:00 2001 From: Pratik Naik Date: Tue, 12 Jan 2010 21:43:55 +0530 Subject: Table alias should be considered when checking for equality --- lib/arel/engines/sql/relations/table.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/arel/engines/sql/relations/table.rb b/lib/arel/engines/sql/relations/table.rb index 0634436280..a409d8223f 100644 --- a/lib/arel/engines/sql/relations/table.rb +++ b/lib/arel/engines/sql/relations/table.rb @@ -52,8 +52,9 @@ module Arel end def ==(other) - Table === other and - name == other.name + Table === other and + name == other.name and + table_alias == other.table_alias end end end -- cgit v1.2.3