codenamev
2/26/2014 - 3:04 PM

Easy Feature Rollouts in Rails

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