Rails: conditionally enable / disable development modules

I create my own dynamic server at the top of the Ruby on Rails framework. I would like to know if there is a way to conditionally enable or disable Devise modules, such as registered, validated, omniauthable, ...

What I tried almost worked, except that I had to restart the rails server to take into account my modification, but in my case I would like the system to work with the boolean defined in the database.

For example :

devise :registerable if registerable_module.enabled? # boolean fetched from database

thanks for the help

+4
source share

Source: https://habr.com/ru/post/1610756/


All Articles