1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

adding joins method to Table

This commit is contained in:
Aaron Patterson 2010-09-07 14:02:23 -07:00
parent 719eacfc81
commit 90881c5841
2 changed files with 12 additions and 0 deletions

View file

@ -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

View file

@ -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 == []