diff options
author | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-04 18:57:54 -0700 |
---|---|---|
committer | Nick Kallen <nkallen@nick-kallens-computer-2.local> | 2008-05-04 18:57:54 -0700 |
commit | cd428ee66498146d3dc14f58c6534d79ab124b45 (patch) | |
tree | 202c8fe7a64b12f4154c0b22981c69e117da83cb /lib/arel/relations/join.rb | |
parent | 4a313bb478765cbc5007aac5097291dabd4628c7 (diff) | |
download | rails-cd428ee66498146d3dc14f58c6534d79ab124b45.tar.gz rails-cd428ee66498146d3dc14f58c6534d79ab124b45.tar.bz2 rails-cd428ee66498146d3dc14f58c6534d79ab124b45.zip |
last of the cleanup -- FOR THE MOMENT
Diffstat (limited to 'lib/arel/relations/join.rb')
-rw-r--r-- | lib/arel/relations/join.rb | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/lib/arel/relations/join.rb b/lib/arel/relations/join.rb index 01e7e36f37..4269731092 100644 --- a/lib/arel/relations/join.rb +++ b/lib/arel/relations/join.rb @@ -51,29 +51,7 @@ module Arel private def externalize(relation) - Externalizer.new(relation) - end - - Externalizer = Struct.new(:relation) do - def selects - relation.aggregation?? [] : relation.selects - end - - def table - relation.aggregation?? relation : relation.table - end - - def relation_for(attribute) - relation.aggregation?? relation : relation.relation_for(attribute) - end - - def table_sql(formatter = Sql::TableReference.new(relation)) - relation.aggregation?? relation.to_sql(formatter) : relation.table.table_sql(formatter) - end - - def attributes - relation.aggregation?? relation.attributes.collect(&:to_attribute) : relation.attributes - end + relation.aggregation?? Aggregation.new(relation) : relation end end end
\ No newline at end of file |