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/cases
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
..
adapters Merge pull request #40651 from ritikesh/create_table_schema_bugfix 2020-11-19 23:39:35 +09:00
arel Properly support reverse_order on relations with nulls_first or nulls_last calls 2020-09-08 11:20:46 -04:00
associations Don't use explicit references for join aliases 2020-12-04 15:19:20 +09:00
attribute_methods Remove internal attribute decoration code 2020-07-20 13:26:25 +09:00
coders
connection_adapters Fix preventing_writes for granular swapping 2020-11-17 11:21:11 -05:00
database_configurations
fixture_set
migration Add test that primary_key and reference columns should be identical type for add_reference 2020-11-13 20:06:42 +09:00
relation Fix or to raise structurally incompatible error for single values 2020-12-02 20:05:01 +09:00
scoping Add option for default_scope to run on all queries 2020-12-01 11:15:08 -05:00
tasks Re-enable Layout/SpaceAroundOperators cop 2020-10-23 16:12:15 +09:00
type Should not accidentally return decorated time object after changes_applied 2020-09-01 16:26:10 +09:00
validations Don't leak uniqueness validation into other tests 2020-11-15 20:08:33 +00:00
adapter_prevent_writes_test.rb Clean up preventing writes tests 2020-11-09 11:57:13 -05:00
adapter_test.rb Remove deprecated methods from ActiveRecord::ConnectionAdapters::DatabaseLimits 2020-10-30 00:25:43 +00:00
aggregations_test.rb
annotate_test.rb
ar_schema_test.rb
associations_test.rb Annotation for Relation#inspect query 2020-10-22 18:55:40 +09:00
attribute_methods_test.rb Fix read_attribute_before_type_cast to consider attribute aliases 2020-10-18 20:32:47 -03:00
attributes_test.rb Unify decorate_attribute_type and attribute 2020-11-30 15:51:19 -06:00
autosave_association_test.rb Methods with association name are defined as public methods 2020-10-02 22:22:10 +09:00
base_prevent_writes_test.rb Clean up preventing writes tests 2020-11-09 11:57:13 -05:00
base_test.rb Fix connected_to_many argument and docs 2020-11-03 17:19:28 -05:00
batches_test.rb Return rows affected from batched update_all and delete_all 2020-10-03 18:27:26 +01:00
binary_test.rb
bind_parameter_test.rb Use statement cache for STI classes 2020-06-10 16:02:16 +09:00
boolean_test.rb
cache_key_test.rb
calculations_test.rb Test calculation with from for all adapters 2020-09-09 19:37:58 +09:00
callbacks_test.rb Dogfooding "active_support/core_ext/symbol/starts_ends_with" 2020-05-06 14:19:25 +09:00
clone_test.rb
collection_cache_key_test.rb
column_alias_test.rb
column_definition_test.rb
comment_test.rb Separate primary key column options from table options 2020-05-24 08:15:39 +09:00
connection_management_test.rb
connection_pool_test.rb Eagerly establish test transactions for shards 2020-10-12 09:11:14 +01:00
core_test.rb Add DATE_FORMATS[:inspect] 2020-05-06 15:05:02 -05:00
counter_cache_test.rb
custom_locking_test.rb
database_configurations_test.rb Remove deprecated methods from ActiveRecord::DatabaseConfigurations 2020-10-30 00:25:37 +00:00
database_selector_test.rb Add helper method for resetting connection handlers in tests 2020-08-10 10:20:12 -04:00
database_statements_test.rb
date_test.rb
date_time_precision_test.rb Revert "Merge pull request #39613 from kamipo/where_with_custom_operator" 2020-07-17 21:05:48 +09:00
date_time_test.rb
defaults_test.rb
delegated_type_test.rb Add delegated type to Active Record (#39341) 2020-05-23 15:14:40 -07:00
dirty_test.rb Promote clear_attribute_change as attribute methods 2020-06-04 04:17:17 +09:00
disconnected_test.rb Revert "Merge pull request #19881 from sikachu/silence-mysql-errno-warning" 2020-09-14 14:02:45 +09:00
dup_test.rb Add option for default_scope to run on all queries 2020-12-01 11:15:08 -05:00
enum_test.rb Fix enum on custom attribute with default 2020-11-05 13:22:53 +09:00
errors_test.rb
explain_subscriber_test.rb
explain_test.rb Remove obsolete explain logging test 2020-05-05 02:24:53 +01:00
filter_attributes_test.rb Make sure that attribute_for_inspect respect filter_attributes 2020-12-02 23:01:34 +00:00
finder_respond_to_test.rb
finder_test.rb Handle Relations with limit in include? 2020-10-06 22:04:23 +00:00
fixtures_test.rb Raise if connection_handlers is called in legacy_connection_handling 2020-11-17 08:38:05 -05:00
forbidden_attributes_protection_test.rb
habtm_destroy_order_test.rb
helper.rb Implement granular role and shard swapping 2020-10-28 15:11:35 -04:00
hot_compatibility_test.rb
i18n_test.rb
inheritance_test.rb move ActiveRecord::Persistance#becomes logic into initialize block 2020-09-20 10:24:19 -06:00
insert_all_test.rb Don't over protect the MySQL users on insert_all 2020-11-04 20:26:22 +00:00
instrumentation_test.rb
integration_test.rb
invalid_connection_test.rb
invertible_migration_test.rb Make index options to kwargs 2020-05-28 07:48:53 +09:00
json_attribute_test.rb
json_serialization_test.rb
json_shared_test_cases.rb
locking_test.rb Methods for locking_column are supposed to be public methods 2020-10-02 22:22:10 +09:00
log_subscriber_test.rb
marshal_serialization_test.rb Add Active Record Marshal forward compatibility tests 2020-07-02 14:11:51 +02:00
migration_test.rb {SchemaMigration,InternalMetadata}.create_table ensure the table is to be created 2020-11-06 12:58:17 +09:00
migrator_test.rb
mixin_test.rb
modules_test.rb Module#const_set is a public method 2020-09-15 17:19:37 +09:00
multi_db_migrator_test.rb
multiparameter_attributes_test.rb
multiple_db_test.rb Removes require_dependency from the AR test suite 2020-05-06 09:01:38 +02:00
nested_attributes_test.rb Association setter methods are defined as public methods 2020-10-02 22:22:10 +09:00
nested_attributes_with_callbacks_test.rb Methods with association name are defined as public methods 2020-10-02 22:22:10 +09:00
null_relation_test.rb Fix flaky assert queries tests 2020-05-27 08:52:44 +09:00
numeric_data_test.rb
persistence_test.rb Remove deprecated ActiveRecord::Base#update_attributes and ActiveRecord::Base#update_attributes! 2020-10-30 00:25:40 +00:00
pooled_connections_test.rb
prepared_statement_status_test.rb
primary_keys_test.rb Separate primary key column options from table options 2020-05-24 08:15:39 +09:00
query_cache_test.rb Raise if connection_handlers is called in legacy_connection_handling 2020-11-17 08:38:05 -05:00
quoting_test.rb Deprecate passing an Active Record object to quote/type_cast directly 2020-05-31 12:38:29 +09:00
readonly_test.rb
reaper_test.rb
reflection_test.rb Association#class_name and table_name are public methods 2020-10-02 22:22:10 +09:00
relation_test.rb Avoid query from exists? on contradictory relation 2020-10-14 12:30:10 -07:00
relations_test.rb Support delegators for find_by 2020-11-13 21:56:24 +09:00
reload_models_test.rb
reserved_word_test.rb
result_test.rb Remove deprecated ActiveRecord::Result#to_hash method 2020-10-30 00:25:33 +00:00
sanitize_test.rb
schema_dumper_test.rb Add basic support for check constraints to database migrations 2020-06-02 22:11:27 -07:00
schema_loading_test.rb
secure_token_test.rb
serialization_test.rb to_json and from_json are public methods 2020-10-02 22:22:10 +09:00
serialized_attribute_test.rb Allow default to be configured for serialization 2020-11-05 15:36:48 +09:00
signed_id_test.rb Add more tests for find_signed/! methods 2020-10-30 12:34:54 +02:00
statement_cache_test.rb Reset statement cache for association if table_name is changed 2020-05-29 15:12:18 +09:00
statement_invalid_test.rb
store_test.rb
strict_loading_test.rb Allow applications to change the behavior for a strict loading violation 2020-11-02 13:01:50 -05:00
suppressor_test.rb
test_case.rb
test_databases_test.rb
test_fixtures_test.rb Raise if connection_handlers is called in legacy_connection_handling 2020-11-17 08:38:05 -05:00
time_precision_test.rb Revert "Merge pull request #39613 from kamipo/where_with_custom_operator" 2020-07-17 21:05:48 +09:00
timestamp_test.rb Allow attribute aliases for timestamp magic columns 2020-06-01 21:29:33 +09:00
touch_later_test.rb
transaction_callbacks_test.rb Remove internal without_transaction_enrollment callbacks 2020-05-01 23:32:26 +09:00
transaction_isolation_test.rb
transactions_test.rb Ensure the connection used in a failed rollback is discarded 2020-11-04 17:01:07 -05:00
type_test.rb
types_test.rb
unconnected_test.rb
unsafe_raw_sql_test.rb Remove deprecated support for using unsafe raw SQL in ActiveRecord::Relation methods 2020-10-30 00:25:32 +00:00
validations_repair_helper.rb
validations_test.rb
view_test.rb
yaml_serialization_test.rb Restore legacy YAML compatibility for MySQL with active_record_yaml_version: 1 2020-06-25 21:04:51 +09:00