plataformatec/devise — pull request #2884 by dlackty (2014-02-25 10:04:52+00:00)
Title: Set default secret_key before eager load

In eba91e65803cf1cbf8dc6a482507596ab7c23e47 and Devise 3.2.3, a new enhancement was introduced to read Rails' `secret_key_base` for Devise's `secret_token`.

However, this feature wouldn't work on production environment since the following codes:

```ruby
# Force routes to be loaded if we are doing any eager load.
config.before_eager_load { |app| app.reload_routes! }
```

will raise a secret token not found error since the token reading happens during `after_initialize`.

This commit fixed my deployment on Heroku. Please let me know if there's any concern.