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/associations
Ryuta Kamizono 6f8fca882b Fix find_by with custom primary key for belongs_to association
Similar to #40809 which is fixed by #40815, but it is caused by dbda5fe.

`value.id if value.respond_to?(:id)` is not always correct if primary
key is customized on the belongs_to association.

Use `reflection.join_primary_key` in that case.

Fixes #41081.
2021-01-12 21:23:36 +09:00
..
belongs_to_associations_test.rb Fix find_by with custom primary key for belongs_to association 2021-01-12 21:23:36 +09:00
bidirectional_destroy_dependencies_test.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
callbacks_test.rb Fix typo in test name 2020-03-21 20:58:56 +09:00
cascaded_eager_loading_test.rb Avoid extraneous preloading when loading across has_one associations 2020-01-08 08:14:04 +13:00
eager_load_includes_full_sti_class_test.rb Support storing demodulized class name for polymorphic type 2020-08-23 16:04:29 +09:00
eager_load_nested_include_test.rb Fix EagerLoadPolyAssocsTest setup (#38883) 2020-04-07 10:14:17 +09:00
eager_singularization_test.rb Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
eager_test.rb Refactor ActiveRecord::Associations::Preloader class 2020-12-11 08:52:53 -05:00
extension_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00
has_and_belongs_to_many_associations_test.rb Replace test Man with Human 2020-08-14 11:37:09 -04:00
has_many_associations_test.rb Implicit scoping does no longer leak scope to class level querying methods 2020-10-30 00:25:38 +00:00
has_many_through_associations_test.rb Fix through association with through scope which has joins 2021-01-06 21:29:11 +09:00
has_one_associations_test.rb Fix flakey destroyed_by_association tests 2020-05-04 19:26:54 -05:00
has_one_through_associations_test.rb Allow constructors for has_one :through 2020-11-09 15:16:39 -03:00
inner_join_association_test.rb Move Arel attribute normalization into arel_table 2020-07-19 23:41:24 +09:00
inverse_associations_test.rb Enable Lint/DuplicateRequire cop 2021-01-09 14:40:47 +09:00
join_model_test.rb Methods with association name are defined as public methods 2020-10-02 22:22:10 +09:00
left_outer_join_association_test.rb feat(rubocop): Add Style/RedundantRegexpEscape 2020-12-08 18:57:09 +00:00
nested_through_associations_test.rb Add option for default_scope to run on all queries 2020-12-01 11:15:08 -05:00
required_test.rb Enable Layout/EmptyLinesAroundAccessModifier cop 2019-06-13 12:00:45 +09:00