From 9ef7afda3beaab7979490665fe2648639ab91e1c Mon Sep 17 00:00:00 2001 From: Ivan Ukhov Date: Wed, 17 Nov 2010 08:47:34 +0800 Subject: Fix a bit the initialization of Table --- lib/arel/table.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/arel') diff --git a/lib/arel/table.rb b/lib/arel/table.rb index 83d0951453..fe12427d1b 100644 --- a/lib/arel/table.rb +++ b/lib/arel/table.rb @@ -22,7 +22,7 @@ module Arel # Sometime AR sends an :as parameter to table, to let the table know # that it is an Alias. We may want to override new, and return a # TableAlias node? - @table_alias = engine[:as] unless engine[:as].to_s == name + @table_alias = engine[:as] unless engine[:as].to_s == @name end end -- cgit v1.2.3