1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/activerecord/test
Ryuta Kamizono 947a5de75d Don't use explicit references for join aliases
As the API doc shows, `references` should be given table names.

https://api.rubyonrails.org/classes/ActiveRecord/QueryMethods.html#method-i-references

However, people (and test cases in the our codebase) sometimes give
association names for `references`.

Since the API example and all test cases in the codebase use symbols as
arguments, so I regarded symbols as user given values in #40106.

But as #40743 indicates, people also use string association names, it
would have unexpected side-effect especially if singular association
names given.

As much as possible to avoid to use user given values, mark internal
references for `where` and use only them for join aliases.

Fixes #40743.
2020-12-04 15:19:20 +09:00
..
active_record/connection_adapters Deduplicate various Active Record schema cache structures 2019-06-03 13:31:42 +02:00
activejob Destroy associations in a background job. 2020-09-24 14:24:15 -04:00
assets Replace test Man with Human 2020-08-14 11:37:09 -04:00
cases Don't use explicit references for join aliases 2020-12-04 15:19:20 +09:00
fixtures Replace test Man with Human 2020-08-14 11:37:09 -04:00
migrations
models Add option for default_scope to run on all queries 2020-12-01 11:15:08 -05:00
schema Fixed odd behavior of inverse_of with multiple belongs_to to same class 2020-11-21 02:06:21 +09:00
support Implement granular role and shard swapping 2020-10-28 15:11:35 -04:00
config.example.yml Remove more code for unsupported frontbase and ibm_db adapters 2020-04-12 11:45:28 +09:00
config.rb