Manage features in Rails application with feature_flags
Manage features in Rails application with feature_flags You must have faced situation while developing to turn off/on some features in your rails application.
So here is ruby gem feature_flags that provides this functionality.Using this we can maintain different features in rails application. So to add gem in your Rails application, Add this line to your application’s Gemfile:
then run command
this will generate 3 files, 1) initializer file in config/initializer/feature_flags.rb 2) migration file for Feature model 3) Feature.rb also it add routes in your rails application
then do
In feature_flags.rb initializer file you can mention which layout to use for view
If you want to generate views then use,
It will also solve branching problem in rails application, as we merge branches having different features and then solving conflicts in it.so feature_flags makes it easy, you just turn on/off that feature in app. for example,
Here are some screenshots, main index view( /feature_flags )
Adding new feature page,