mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
clients.id
This commit is contained in:
parent
804a304065
commit
6c688d000f
1 changed files with 1 additions and 1 deletions
|
@ -639,7 +639,7 @@ h4. Using a String SQL Fragment
|
|||
You can just supply the raw SQL specifying the +JOIN+ clause to the +:joins+ option. For example:
|
||||
|
||||
<ruby>
|
||||
Client.all(:joins => 'LEFT OUTER JOIN addresses ON addresses.client_id = client.id')
|
||||
Client.all(:joins => 'LEFT OUTER JOIN addresses ON addresses.client_id = clients.id')
|
||||
</ruby>
|
||||
|
||||
This will result in the following SQL:
|
||||
|
|
Loading…
Reference in a new issue