diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2018-06-26 03:48:18 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2018-06-26 03:48:18 +0900 |
commit | 5eed3bba5e10bd3aeb3a1ca1d3037268e1de1148 (patch) | |
tree | 3eeac8bf2e26aff5fa3739438504ea24e6303f2c /activestorage | |
parent | b2eb1d1c55a59fee1e6c4cba7030d8ceb524267c (diff) | |
download | rails-5eed3bba5e10bd3aeb3a1ca1d3037268e1de1148.tar.gz rails-5eed3bba5e10bd3aeb3a1ca1d3037268e1de1148.tar.bz2 rails-5eed3bba5e10bd3aeb3a1ca1d3037268e1de1148.zip |
Use `reflection.alias_candidate` in `table_alias_for`
The "join" affix in `table_alias_for` was added 12 years ago at 02d3444
to address poor alias tracking.
`AssociationScope` no longer uses the "join" suffixed alias since
0408e21 and had been removed at a1ec8b5.
`table_alias_for` is the last place that using the useless legacy
suffixed alias, but we can't remove the suffix since some test cases
directly refers the alias name by `where` with string literal, so at
least removing the suffix would break our test cases.
(e.g. https://github.com/rails/rails/blob/b2eb1d1c55a59fee1e6c4cba7030d8ceb524267c/activerecord/test/cases/associations/has_and_belongs_to_many_associations_test.rb#L699-L731).
Diffstat (limited to 'activestorage')
0 files changed, 0 insertions, 0 deletions