lib/superstore/railtie.rb in superstore-1.1.1 vs lib/superstore/railtie.rb in superstore-1.1.2
- old
+ new
@@ -6,10 +6,11 @@
initializer "superstore.config" do |app|
ActiveSupport.on_load :superstore do
pathnames = [Rails.root.join('config', 'superstore.yml'), Rails.root.join('config', 'cassandra.yml')]
if pathname = pathnames.detect(&:exist?)
- config = YAML.load(pathname.read)
+ config = ERB.new(pathname.read).result
+ config = YAML.load(config)
if config = config[Rails.env]
self.config = config.symbolize_keys!
else
raise "Missing environment #{Rails.env} in superstore.yml"