AgileVentures/LocalSupport — pull request #47 by dcorking (2014-05-09 13:01:38+00:00)
Title: Feature flag for the volunteer opportunities feature

We created an ActiveRecord feature flag inspired by the rollout gem (which needs Redis.)

The flag works by selecting different code paths, based on the value of `Feature.active?(:volunteer_ops)`

Run 'bundle exec rake db:migrate` to add the Feature table.

To create the flag

Feature.create(:name => :volunteer_ops)
and to deactivate it

Feature.deactivate(:volunteer_ops)

To activate

Feature.activate(:volunteer_ops)

We disabled the links in the navbar, the 'create a volunteer opportunity' button in the organization show page, and all the routes associated with volunteer opportunities. (We restored the commented out code path and scenario that disabled the navbar links.)

Rdoc style docs are in app/models/feature.rb
Feature file is features/volunteer_opportunities/disable_volunteer_opportunities.feature