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

Some databases (e.g. Oracle) does not allow "AS" between table name and table alias name, for others it is optional

This commit is contained in:
Raimonds Simanovskis 2009-08-03 14:13:03 +03:00
parent 53be10c5e6
commit 5f0c425e8d

View file

@ -1027,7 +1027,7 @@ class FinderTest < ActiveRecord::TestCase
def test_joins_dont_clobber_id
first = Firm.find(
:first,
:joins => 'INNER JOIN companies AS clients ON clients.firm_id = companies.id',
:joins => 'INNER JOIN companies clients ON clients.firm_id = companies.id',
:conditions => 'companies.id = 1'
)
assert_equal 1, first.id