diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2019-01-29 15:17:52 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2019-01-29 15:49:40 -0800 |
commit | e17fe52e0e0ef0842b6c409e1110a862c4e005bc (patch) | |
tree | fcc3617c202d873ffed4d99844fbd7d6f6712cd0 /actionview/test/activerecord/multifetch_cache_test.rb | |
parent | 94d54fa4ab641a0ddeb173409cb41cc5becc02a9 (diff) | |
download | rails-e17fe52e0e0ef0842b6c409e1110a862c4e005bc.tar.gz rails-e17fe52e0e0ef0842b6c409e1110a862c4e005bc.tar.bz2 rails-e17fe52e0e0ef0842b6c409e1110a862c4e005bc.zip |
Tighten up the AV::Base constructor
The AV::Base constructor was too complicated, and this commit tightens
up the parameters it will take. At runtime, AV::Base is most commonly
constructed here:
https://github.com/rails/rails/blob/94d54fa4ab641a0ddeb173409cb41cc5becc02a9/actionview/lib/action_view/rendering.rb#L72-L74
This provides an AV::Renderer instance, a hash of assignments, and a
controller instance. Since this is the common case for construction, we
should remove logic from the constructor that handles other cases. This
commit introduces special constructors for those other cases.
Interestingly, most code paths that construct AV::Base "strangely" are
tests.
Diffstat (limited to 'actionview/test/activerecord/multifetch_cache_test.rb')
-rw-r--r-- | actionview/test/activerecord/multifetch_cache_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionview/test/activerecord/multifetch_cache_test.rb b/actionview/test/activerecord/multifetch_cache_test.rb index 12be069e69..229b4e56d0 100644 --- a/actionview/test/activerecord/multifetch_cache_test.rb +++ b/actionview/test/activerecord/multifetch_cache_test.rb @@ -19,7 +19,7 @@ class MultifetchCacheTest < ActiveRecordTestCase def combined_fragment_cache_key(key) [ :views, key ] end - end.new(view_paths, {}) + end.with_view_paths(view_paths, {}) end def test_only_preloading_for_records_that_miss_the_cache |