Skip to content

Instantly share code, notes, and snippets.

@codenamev
Created February 26, 2014 15:04
Show Gist options
  • Save codenamev/9231059 to your computer and use it in GitHub Desktop.
Save codenamev/9231059 to your computer and use it in GitHub Desktop.
Easy Feature Rollouts in Rails
module Rollout
def self.features
@features ||= YAML.load_file(Rails.root.join("config", "rollout.yml"))[Rails.env]
end
def self.features=(value)
@features = value
end
def self.active?(key)
features[key.to_s]
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment