diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-12 18:15:21 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-12 18:15:21 -0700 |
commit | d4abd35feb84db37815ecd8f0b37f657317105c1 (patch) | |
tree | dd1de06baa686e96868284df5534a5eb0bad0e2e /lib/arel/table.rb | |
parent | 53159770271c24a4c0ba6bca6a9e09683157dd9d (diff) | |
download | rails-d4abd35feb84db37815ecd8f0b37f657317105c1.tar.gz rails-d4abd35feb84db37815ecd8f0b37f657317105c1.tar.bz2 rails-d4abd35feb84db37815ecd8f0b37f657317105c1.zip |
using table_alias when :as is passed to the constructor
Diffstat (limited to 'lib/arel/table.rb')
-rw-r--r-- | lib/arel/table.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/table.rb b/lib/arel/table.rb index efdc34ed94..1519efa63b 100644 --- a/lib/arel/table.rb +++ b/lib/arel/table.rb @@ -14,6 +14,11 @@ module Arel @columns = nil @aliases = [] @table_alias = nil + + # 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] if Hash === engine end def alias |