diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-30 09:54:23 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-30 09:54:23 -0700 |
commit | e8563a6234b4f60f8d756d89b3b35026a467694e (patch) | |
tree | f421b271d969036315b516f75555c32b4a218fe9 /lib/arel/factory_methods.rb | |
parent | ff1718142c29d6373d07c108a9ea85a96d4ec62f (diff) | |
download | rails-e8563a6234b4f60f8d756d89b3b35026a467694e.tar.gz rails-e8563a6234b4f60f8d756d89b3b35026a467694e.tar.bz2 rails-e8563a6234b4f60f8d756d89b3b35026a467694e.zip |
use TableAlias nodes for aliasing subselects
Diffstat (limited to 'lib/arel/factory_methods.rb')
-rw-r--r-- | lib/arel/factory_methods.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/arel/factory_methods.rb b/lib/arel/factory_methods.rb index 09b82c0555..2ced1f8971 100644 --- a/lib/arel/factory_methods.rb +++ b/lib/arel/factory_methods.rb @@ -2,6 +2,10 @@ module Arel ### # Methods for creating various nodes module FactoryMethods + def create_table_alias relation, name + Nodes::TableAlias.new(relation, name) + end + def create_join to, constraint = nil, klass = Nodes::InnerJoin klass.new(to, constraint) end |