diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-30 09:21:45 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-03-30 09:21:45 -0700 |
commit | ff1718142c29d6373d07c108a9ea85a96d4ec62f (patch) | |
tree | 25ae147d7cb30d7aa81a4c84e9b3f645a3c6773b /lib | |
parent | f771b71d1d7cb75e4d19b85e33a85f659088f17f (diff) | |
download | rails-ff1718142c29d6373d07c108a9ea85a96d4ec62f.tar.gz rails-ff1718142c29d6373d07c108a9ea85a96d4ec62f.tar.bz2 rails-ff1718142c29d6373d07c108a9ea85a96d4ec62f.zip |
fixing the leg order of TableAlias nodes
Diffstat (limited to 'lib')
-rw-r--r-- | lib/arel/nodes/table_alias.rb | 4 | ||||
-rw-r--r-- | lib/arel/table.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/arel/nodes/table_alias.rb b/lib/arel/nodes/table_alias.rb index 1d3d36be0c..6ec17885fb 100644 --- a/lib/arel/nodes/table_alias.rb +++ b/lib/arel/nodes/table_alias.rb @@ -1,8 +1,8 @@ module Arel module Nodes class TableAlias < Arel::Nodes::Binary - alias :name :left - alias :relation :right + alias :name :right + alias :relation :left alias :table_alias :name def [] name diff --git a/lib/arel/table.rb b/lib/arel/table.rb index 2aff71b220..82d160b87e 100644 --- a/lib/arel/table.rb +++ b/lib/arel/table.rb @@ -43,7 +43,7 @@ primary_key (#{caller.first}) is deprecated and will be removed in ARel 3.0.0 end def alias name = "#{self.name}_2" - Nodes::TableAlias.new(name, self).tap do |node| + Nodes::TableAlias.new(self, name).tap do |node| @aliases << node end end |