From 45f87174d11dc549a059b7a041172db25bcc32ce Mon Sep 17 00:00:00 2001 From: JoelJuliano Date: Sun, 30 Oct 2011 19:06:15 -0500 Subject: Allow using non-table alias as a rhs relation name, fix for #84 and #59 --- lib/arel/nodes/table_alias.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/arel') diff --git a/lib/arel/nodes/table_alias.rb b/lib/arel/nodes/table_alias.rb index 6ec17885fb..b32f057117 100644 --- a/lib/arel/nodes/table_alias.rb +++ b/lib/arel/nodes/table_alias.rb @@ -10,7 +10,7 @@ module Arel end def table_name - relation.name + relation.respond_to?(:name) ? relation.name : name end end end -- cgit v1.2.3