Skip to content

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!

  1. Add the gem manually to your Gemfile:

    gem "togglefy", "~> 1.2"
    1. You can also add it to your Gemfile by running:

      bundle add togglefy
    2. Or, if you’re not using Bundler for whatever reason:

      gem install togglefy
  2. After that, simply run the generate command to get the necessary migrations:

    rails generate togglefy:install
  3. 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.

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/.