diff options
author | Yves Senn <yves.senn@gmail.com> | 2014-01-21 17:17:13 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2014-01-21 17:21:20 +0100 |
commit | e011258c30b61f30e40fb2d9b2f58eb1f700dfd5 (patch) | |
tree | 6244915c20c76047a61b08993ec8b0e3dd6590f4 /activerecord/test/models/movie.rb | |
parent | c60e06261b9e26110f8ac639224c153d4ff77752 (diff) | |
download | rails-e011258c30b61f30e40fb2d9b2f58eb1f700dfd5.tar.gz rails-e011258c30b61f30e40fb2d9b2f58eb1f700dfd5.tar.bz2 rails-e011258c30b61f30e40fb2d9b2f58eb1f700dfd5.zip |
prepend table name for `Relation#select` columns.
This fixes a bug where `select(:id)` combined with `joins()` raised:
```
ActiveRecord::StatementInvalid: SQLite3::SQLException: ambiguous column name: id:
SELECT id, authors.author_address_id
FROM "posts"
INNER JOIN "authors"
ON "authors"."id" = "posts"."author_id"
ORDER BY posts.id LIMIT 3
```
The `select_values` are still String and Symbols because other parts (mainly calculations.rb)
rely on that fact.
/cc @tenderlove
Diffstat (limited to 'activerecord/test/models/movie.rb')
0 files changed, 0 insertions, 0 deletions