Remove Feature
This commit is contained in:
parent
45019ce75c
commit
71c852fc85
1 changed files with 0 additions and 26 deletions
|
@ -1,26 +0,0 @@
|
|||
require 'yaml'
|
||||
# this class manage features
|
||||
# Features must be added in file config/initializers/features.yml :
|
||||
# feature_name: true
|
||||
# other_feature: false
|
||||
#
|
||||
# this file is templated by ansible for staging and production so don't forget to add your features in
|
||||
# ansible config
|
||||
class Features
|
||||
class << self
|
||||
if File.exist?("#{File.dirname(__FILE__)}/features.yml")
|
||||
features_map = YAML.load_file("#{File.dirname(__FILE__)}/features.yml")
|
||||
if features_map
|
||||
features_map.each do |feature, value|
|
||||
define_method("#{feature}") do
|
||||
value
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def method_missing(method, *args)
|
||||
false
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Reference in a new issue