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
eileencodes ee824c8858 Fix regression in inverse_of on through associations
`inverse_of` on through associations was accidently removed/caused to
stop working in commit f8d2899 which was part of a refactoring on
`ThroughReflection`.

To fix we moved `inverse_of` and `check_validity_of_inverse!` to the
`AbstractReflection` so it's available to the `ThroughReflection`
without having to dup any methods. We then need to delegate `inverse_name`
method in `ThroughReflection`. `inverse_name` can't be moved to
`AbstractReflection` without moving methods that set the instance
variable `@automatic_inverse_of`.

This adds a test that ensures that `inverse_of` on a `ThroughReflection`
returns the correct class name, and the correct record for the inverse
relationship.

Fixes #21692
2015-09-26 16:26:56 -04:00
..
association_scope_test.rb Use an Attribute object to represent a bind value 2015-01-27 12:07:06 -07:00
belongs_to_associations_test.rb Don't rely on subsecond precision being applied in tests 2015-09-23 09:33:43 -06:00
callbacks_test.rb Revert ":cut: remove unnecessary rescue Exceptions" 2015-03-06 12:16:18 +01:00
cascaded_eager_loading_test.rb
eager_load_includes_full_sti_class_test.rb
eager_load_nested_include_test.rb
eager_singularization_test.rb
eager_test.rb Removed mocha from Active Record Part 1 2015-08-25 22:07:25 +05:30
extension_test.rb
has_and_belongs_to_many_associations_test.rb Include association's unscope when preloading 2015-09-09 13:27:40 -04:00
has_many_associations_test.rb Don't rely on subsecond precision being applied in tests 2015-09-23 09:33:43 -06:00
has_many_through_associations_test.rb Removed mocha from Active Record Part 1 2015-08-25 22:07:25 +05:30
has_one_associations_test.rb Merge pull request #21581 from ronakjangir47/restrict_with_error 2015-09-17 16:30:10 +02:00
has_one_through_associations_test.rb Skip statement cache on through association reader 2015-08-12 21:17:30 -03:00
inner_join_association_test.rb
inverse_associations_test.rb Fix regression in inverse_of on through associations 2015-09-26 16:26:56 -04:00
join_model_test.rb Silence deprecation warning from force reload 2015-07-16 16:06:26 -04:00
nested_through_associations_test.rb Fix misleading errors for has_one through relations 2015-07-22 00:51:23 +03:00
required_test.rb Closes rails/rails#18864: Renaming transactional fixtures to transactional tests 2015-03-16 11:35:44 -07:00