aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations/alias.rb
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-04 18:18:28 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-05-04 18:18:28 -0700
commit92c2fd2a2fe029ffe2597134496bdab7f1ed4de6 (patch)
treec14b3e21bc6c778c6c135c4b497bb5295d692489 /lib/arel/relations/alias.rb
parent6b28dcfa7e03909b69b922e26eb6d3ad8eb3f061 (diff)
downloadrails-92c2fd2a2fe029ffe2597134496bdab7f1ed4de6.tar.gz
rails-92c2fd2a2fe029ffe2597134496bdab7f1ed4de6.tar.bz2
rails-92c2fd2a2fe029ffe2597134496bdab7f1ed4de6.zip
introducing structural recursion
Diffstat (limited to 'lib/arel/relations/alias.rb')
-rw-r--r--lib/arel/relations/alias.rb15
1 files changed, 2 insertions, 13 deletions
diff --git a/lib/arel/relations/alias.rb b/lib/arel/relations/alias.rb
index 0099a794b4..08be02e862 100644
--- a/lib/arel/relations/alias.rb
+++ b/lib/arel/relations/alias.rb
@@ -1,5 +1,7 @@
module Arel
class Alias < Compound
+ include Recursion::BaseCase
+
def initialize(relation)
@relation = relation
end
@@ -7,18 +9,5 @@ module Arel
def ==(other)
equal? other
end
-
- def table
- self
- end
-
- def relation_for(attribute)
- self[attribute] and self
- end
-
- def table_sql(formatter = Sql::TableReference.new(self))
- formatter.table self
- end
-
end
end \ No newline at end of file