Getting Started
Togglefy is a simple feature management Rails gem to help you control which features an assignable has access to.
Togglefy is free, open source and you are welcome to help build it. Give us a star on GitHub if you can!
Quick Start
Section titled “Quick Start”Installation
Section titled “Installation”-
Add the gem manually to your
Gemfile
:gem "togglefy", "~> 1.2"-
You can also add it to your
Gemfile
by running:bundle add togglefy -
Or, if you’re not using Bundler for whatever reason:
gem install togglefy
-
-
After that, simply run the generate command to get the necessary migrations:
rails generate togglefy:install -
And you’re good to go!
This generate
command will create the migrations to create the tables inside your project.
Please, don’t remove/change anything else that’s there or Togglefy may not work as expected.
Running the migrations
Section titled “Running the migrations”Run the migration to create these in your database:
rails db:migrate
Or if you’re using a legacy codebase:
rake db:migrate
The models are stored inside Togglefy, so you don’t need to create them inside your project unless you want to.
If that’s something you want, you can check them following this path: app/models/togglefy/
.