Skip to content

Commit

Permalink
Add support for ERB evaluation in the config/sphinx.yml file.
Browse files Browse the repository at this point in the history
  • Loading branch information
potatosalad authored and pat committed Jun 15, 2008
1 parent 18b1f31 commit c55fbba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/thinking_sphinx/configuration.rb
Expand Up @@ -183,7 +183,7 @@ def parse_config
path = "#{app_root}/config/sphinx.yml"
return unless File.exists?(path)

conf = YAML.load(File.open(path))[environment]
conf = YAML::load(ERB.new(IO.read(path)).result)[environment]

conf.each do |key,value|
self.send("#{key}=", value) if self.methods.include?("#{key}=")
Expand Down

0 comments on commit c55fbba

Please sign in to comment.