Skip to content

Commit

Permalink
Parse ERB in config.yml.
Browse files Browse the repository at this point in the history
  • Loading branch information
glenngillen authored and gma committed Mar 3, 2012
1 parent 1995ff7 commit 3bea581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/nesta/config.rb
Expand Up @@ -65,7 +65,7 @@ def self.can_use_yaml?

def self.from_yaml(setting)
if can_use_yaml?
self.yaml_conf ||= YAML::load(IO.read(yaml_path))
self.yaml_conf ||= YAML::load(ERB.new(IO.read(yaml_path)).result)
rack_env_conf = self.yaml_conf[Nesta::App.environment.to_s]
(rack_env_conf && rack_env_conf[setting]) || self.yaml_conf[setting]
end
Expand Down

0 comments on commit 3bea581

Please sign in to comment.