Add test and fix changelog for `schema_cache_ignored_table?`

This commit is contained in:
eileencodes 2024-05-21 15:37:38 -04:00
parent 2281edf99e
commit 227c590d02
No known key found for this signature in database
GPG Key ID: 1F2A92B7CFDF7455
2 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,7 @@
```ruby ```ruby
ActiveRecord.schema_cache_ignored_tables = ["developers"] ActiveRecord.schema_cache_ignored_tables = ["developers"]
ActiveRecord.schema_cache_ignored_tables?("developers") ActiveRecord.schema_cache_ignored_table?("developers")
=> true => true
``` ```

View File

@ -231,7 +231,9 @@ module ActiveRecord
def test_marshal_dump_and_load_with_ignored_tables def test_marshal_dump_and_load_with_ignored_tables
old_ignore = ActiveRecord.schema_cache_ignored_tables old_ignore = ActiveRecord.schema_cache_ignored_tables
assert_not ActiveRecord.schema_cache_ignored_table?("professors")
ActiveRecord.schema_cache_ignored_tables = ["professors"] ActiveRecord.schema_cache_ignored_tables = ["professors"]
assert ActiveRecord.schema_cache_ignored_table?("professors")
# Create an empty cache. # Create an empty cache.
cache = new_bound_reflection cache = new_bound_reflection