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
Yves Senn 0e9957135d Introduce reload_<association> reader for singular associations.
This patch brings back the functionality of passing true to the
association proxy. The behavior was deprecated with #20888 and scheduled
for removal in Rails 5.1.

The deprecation mentioned that instead of `Article.category(true)` one
should use `article#reload.category`. Unfortunately the alternative does
not expose the same behavior as passing true to the reader
did. Specifically reloading the parent record throws unsaved changes and
other caches away. Passing true only affected the association.

This is problematic and there is no easy workaround. I propose to bring
back the old functionality by introducing this new reader method for
singular associations.
2016-11-22 12:37:42 +01:00
..
active_record/connection_adapters Add more rubocop rules about whitespaces 2016-10-29 01:17:49 -02:00
assets
cases Introduce reload_<association> reader for singular associations. 2016-11-22 12:37:42 +01:00
fixtures Merge pull request #26466 from y-yagi/remove_duplicated_fixture_set_names 2016-09-13 13:21:28 -04:00
migrations modernizes hash syntax in activerecord 2016-08-06 19:37:57 +02:00
models Deprecate the behavior of AR::Dirty inside of after_(create|update|save) callbacks 2016-11-01 13:16:33 -04:00
schema Remove a confusing comment 2016-10-31 10:27:01 +09:00
support Fix typo s/with/without/ 2016-11-20 05:47:30 +09:00
.gitignore
config.example.yml Fix tests for prepared_statements: false and queries hitting #select_all 2016-11-19 21:52:52 +05:30
config.rb