aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2010-09-07 14:49:06 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2010-09-07 14:49:06 -0700
commit502b43f00904967d9679b208a08beb764ce8911e (patch)
tree47576effb0de5fdaf717e62e22fd0ae1cb431462 /lib
parent90881c5841c49a2e56662b6d32e8058dfb1aa8b7 (diff)
downloadrails-502b43f00904967d9679b208a08beb764ce8911e.tar.gz
rails-502b43f00904967d9679b208a08beb764ce8911e.tar.bz2
rails-502b43f00904967d9679b208a08beb764ce8911e.zip
joins are starting to work better
Diffstat (limited to 'lib')
-rw-r--r--lib/arel/table.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/arel/table.rb b/lib/arel/table.rb
index 7811c217a7..434f19cc6b 100644
--- a/lib/arel/table.rb
+++ b/lib/arel/table.rb
@@ -30,14 +30,14 @@ module Arel
nil
end
- def join relation
+ def join relation, klass = Nodes::InnerJoin
sm = SelectManager.new(@engine)
case relation
when String, Nodes::SqlLiteral
raise if relation.blank?
sm.from Nodes::StringJoin.new(self, relation)
else
- sm.from Nodes::InnerJoin.new(self, relation, nil)
+ sm.from klass.new(self, relation, nil)
end
end