aboutsummaryrefslogtreecommitdiffstats
path: root/lib/arel/relations
diff options
context:
space:
mode:
authorNick Kallen <nkallen@nick-kallens-computer-2.local>2008-04-19 20:40:47 -0700
committerNick Kallen <nkallen@nick-kallens-computer-2.local>2008-04-19 20:40:47 -0700
commit9567f8e4e87f95929f331a2d5eb35bce952eac86 (patch)
tree362b11356c5853ce4217fbfb8ad22d4c97285f4f /lib/arel/relations
parent86885933c42a620026d6d5a9fab2a22bcfdc1f79 (diff)
downloadrails-9567f8e4e87f95929f331a2d5eb35bce952eac86.tar.gz
rails-9567f8e4e87f95929f331a2d5eb35bce952eac86.tar.bz2
rails-9567f8e4e87f95929f331a2d5eb35bce952eac86.zip
- new todo items
- alias to_sql to to_s - added column_for to join (untested)
Diffstat (limited to 'lib/arel/relations')
-rw-r--r--lib/arel/relations/join.rb5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/arel/relations/join.rb b/lib/arel/relations/join.rb
index fb51ea0260..d5ec9d43bd 100644
--- a/lib/arel/relations/join.rb
+++ b/lib/arel/relations/join.rb
@@ -37,6 +37,11 @@ module Arel
end
end
+ # TESTME: Not sure which scenario needs this method, was driven by failing tests in ActiveRecord
+ def column_for(attribute)
+ (relation1[attribute] || relation2[attribute]).column
+ end
+
def joins
this_join = [
join_sql,