Skip to content
Browse files

Merge pull request #7 from mattonrails/erb_in_config

Allow ERB use in campaign_monitor_subscriber.yml
  • Loading branch information...
2 parents 430324e + b7fc482 commit 1aaa1bfb9933ca6b74a733011b3b2b299ef8241b @garygreyling garygreyling committed Oct 4, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/campaign_monitor_subscriber/basic_configuration.rb
View
2 lib/campaign_monitor_subscriber/basic_configuration.rb
@@ -10,7 +10,7 @@ module BasicConfiguration
# All yaml config is namespaced under the environment name (the same way
# database.yml does it)
def raw_cms_config
- @raw_cms_config ||= YAML::load_file(File.join("config/campaign_monitor_subscriber.yml"))[::Rails.env]
+ @raw_cms_config ||= YAML.load(ERB.new(File.read("config/campaign_monitor_subscriber.yml")).result)[Rails.env]
end
end
end

0 comments on commit 1aaa1bf

Please sign in to comment.
Something went wrong with that request. Please try again.