From f656bb301a43fe441af0039e4fafe40a7faa62f8 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Fri, 19 Apr 2019 23:01:24 +0900 Subject: Deprecate `collection_cache_key` which is private API The `collection_cache_key` is private API for a long time, but I've maintained it in #35848 since it is mentioned in the doc (https://github.com/rails/rails/pull/35848#discussion_r272011475). The doc has removed at 1da9a7e4, so there is no longer a reason to maintain that private API. --- activerecord/test/cases/collection_cache_key_test.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'activerecord/test/cases/collection_cache_key_test.rb') diff --git a/activerecord/test/cases/collection_cache_key_test.rb b/activerecord/test/cases/collection_cache_key_test.rb index f07f3c42e6..f01bc0d7f1 100644 --- a/activerecord/test/cases/collection_cache_key_test.rb +++ b/activerecord/test/cases/collection_cache_key_test.rb @@ -13,7 +13,9 @@ module ActiveRecord fixtures :developers, :projects, :developers_projects, :topics, :comments, :posts test "collection_cache_key on model" do - assert_match(/\Adevelopers\/query-(\h+)-(\d+)-(\d+)\z/, Developer.collection_cache_key) + assert_deprecated do + assert_match(/\Adevelopers\/query-(\h+)-(\d+)-(\d+)\z/, Developer.collection_cache_key) + end end test "cache_key for relation" do -- cgit v1.2.3