aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/arel/table.rb4
-rw-r--r--spec/arel/table_spec.rb8
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/arel/table.rb b/lib/arel/table.rb
index faf4d70f64..7811c217a7 100644
--- a/lib/arel/table.rb
+++ b/lib/arel/table.rb
@@ -26,6 +26,10 @@ module Arel
SelectManager.new(@engine).from(self)
end
+ def joins manager
+ nil
+ end
+
def join relation
sm = SelectManager.new(@engine)
case relation
diff --git a/spec/arel/table_spec.rb b/spec/arel/table_spec.rb
index ae43183c67..2ea45dcca1 100644
--- a/spec/arel/table_spec.rb
+++ b/spec/arel/table_spec.rb
@@ -6,6 +6,14 @@ module Arel
@relation = Table.new(:users)
end
+ describe 'backwards compat' do
+ describe 'joins' do
+ it 'returns nil' do
+ check @relation.joins(nil).should == nil
+ end
+ end
+ end
+
describe 'alias' do
it 'should create a node that proxies to a table' do
check @relation.aliases.should == []