Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Fetching latest commit…
Cannot retrieve the latest commit at this time.
|Failed to load latest commit information.|
Feature Hider ============ Hide features based on the current Rails environment. Example ======= First, specify your new features in config/features.yml. You can generate this file by running the following rake task: $ rake hider:config:generate Let's say you're about to release a feature you call "chunky bacon" that you only want active in development and staging for now. Here's how you'd specify that in features.yml: chunky_bacon: test: true development: true staging: false production: false So now in your view, you can do something like this: <%- if FEATURES[:chunky_bacon].active? -%> This is where the chunky bacon goes. <%- else -%> No chunky bacon here... yet. <%- end -%> Obviously, when you're ready to push the feature out to all of your environments, you can just remove the conditional. That's pretty much it for now. TODO ==== * Time-based feature activations (so a feature would go active at a certain date/time) Copyright (c) 2008 Pat Nakajima, Animoto Productions, released under the MIT license