mirror of
https://github.com/heartcombo/devise.git
synced 2026-01-09 15:47:59 -05:00
When supporting Rails 5.2 credentials on https://github.com/plataformatec/devise/pull/4712, we ended up breaking apps that were upgraded to Rails 5.2 and weren't using `credentials` to store their `secret_key_base`. See https://github.com/plataformatec/devise/issues/4807 for more context. To fix it, we're now checking whether the key is present before using it. Since there weren't any automated test for this - the conditionals were in a Rails engine initializer - I've extracted it to a new class so that we are able to test it easily. Fixes #4807