This repository is private.
All pages are served over SSL and all pushing and pulling is done over SSH.
No one may fork, clone, or view it unless they are added as a member.
Every repository with this icon (
) is private.
Every repository with this icon (
This repository is public.
Anyone may fork, clone, or view it.
Every repository with this icon (
) is public.
Every repository with this icon (
| name | age | message | |
|---|---|---|---|
| |
MIT-LICENSE | Tue Jun 17 13:28:58 -0700 2008 | [nakajima] |
| |
README | Tue Jun 17 13:34:03 -0700 2008 | [nakajima] |
| |
Rakefile | Tue Jun 17 13:28:58 -0700 2008 | [nakajima] |
| |
init.rb | Tue Jun 17 13:28:58 -0700 2008 | [nakajima] |
| |
install.rb | Tue Jun 17 13:28:58 -0700 2008 | [nakajima] |
| |
lib/ | Tue Jun 17 13:28:58 -0700 2008 | [nakajima] |
| |
tasks/ | Tue Jun 17 13:28:58 -0700 2008 | [nakajima] |
| |
test/ | Tue Jun 17 13:28:58 -0700 2008 | [nakajima] |
| |
uninstall.rb | Tue Jun 17 13:28:58 -0700 2008 | [nakajima] |
README
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




