It's possible change dynamically devise configuration without app restart?

790 views Asked by At

I'm using devise v.2.2.4 on my Rails 3.2.17 and I need some features related with security policies.

The admin user will change the security policies at any time like show next image: enter image description here

but I don't know how make it with devise, because devise read configuration of initializers/devise.rb and on production all initializer are loading the first time only.

1

There are 1 answers

2
ryaz On

I believe you can pre-seed some table with default preferences data for devise (or any other gem/library) and then get it from the db in your initializer. Then add some crud to let admin user change this preferences. But full restart of app will be needed for update this preferences.