Silence deprecation warnings in secrets

We were getting a ton of deprecation warnings:

```
DEPRECATION WARNING: `Rails.application.secrets` is deprecated in favor
of `Rails.application.credentials` and will be removed in Rails 7.2
```

However, we don't plan to replace the secrets with credentials in the
foreseeable future because it would affect existing Consul Democracy
installations, so for now we're simply silencing the warnings.
This commit is contained in:
Javi Martín
2024-04-15 00:32:38 +02:00
parent 3d11aa86ce
commit ce62da1f88

View File

@@ -21,6 +21,14 @@ Bundler.require(*Rails.groups)
module Consul module Consul
class Application < Rails::Application class Application < Rails::Application
def secrets
Rails.deprecator.silence { super }
end
def secret_key_base
Rails.deprecator.silence { super }
end
config.load_defaults 7.0 config.load_defaults 7.0
# Keep belongs_to fields optional by default, because that's the way # Keep belongs_to fields optional by default, because that's the way