aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/primitives
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-04-28 14:01:33 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-04-28 14:01:33 -0700
commit09b2406e829cee71e4543a75fc4fbe226157d35e (patch)
treeee8a230c3b9c1d4f31cef38defe269f6b8868859 /lib/arel/primitives
parent3ae7a601e962468468eac1399ebdfd7113730310 (diff)
downloadrails-09b2406e829cee71e4543a75fc4fbe226157d35e.tar.gz
rails-09b2406e829cee71e4543a75fc4fbe226157d35e.tar.bz2
rails-09b2406e829cee71e4543a75fc4fbe226157d35e.zip
automatically aliasing tables
Diffstat (limited to 'lib/arel/primitives')
-rw-r--r--lib/arel/primitives/attribute.rb10
1 files changed, 1 insertions, 9 deletions
diff --git a/lib/arel/primitives/attribute.rb b/lib/arel/primitives/attribute.rb
index 280fc9f439..797ebfd07b 100644
--- a/lib/arel/primitives/attribute.rb
+++ b/lib/arel/primitives/attribute.rb
@@ -30,10 +30,6 @@ module Arel
end
include Transformations
- def qualified_name
- "#{prefix}.#{name}"
- end
-
def column
relation.column_for(self)
end
@@ -122,7 +118,7 @@ module Arel
include Expressions
def to_sql(formatter = Sql::WhereCondition.new(engine))
- formatter.attribute prefix, name, self.alias
+ formatter.attribute relation.prefix_for(self), name, self.alias
end
def format(object)
@@ -133,9 +129,5 @@ module Arel
def formatter
Sql::Attribute.new(self)
end
-
- def prefix
- relation.prefix_for(self)
- end
end
end \ No newline at end of file