diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-07 14:02:23 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2010-09-07 14:02:23 -0700 |
commit | 90881c5841c49a2e56662b6d32e8058dfb1aa8b7 (patch) | |
tree | 954a19008f42ccf5407fccb6862d66cb4d6b75d5 | |
parent | 719eacfc81a94bde89a187356abfa090544bba80 (diff) | |
download | rails-90881c5841c49a2e56662b6d32e8058dfb1aa8b7.tar.gz rails-90881c5841c49a2e56662b6d32e8058dfb1aa8b7.tar.bz2 rails-90881c5841c49a2e56662b6d32e8058dfb1aa8b7.zip |
adding joins method to Table
-rw-r--r-- | lib/arel/table.rb | 4 | ||||
-rw-r--r-- | spec/arel/table_spec.rb | 8 |
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 == [] |