lib/superstore/railtie.rb in superstore-1.0.0 vs lib/superstore/railtie.rb in superstore-1.0.2
- old
+ new
@@ -4,11 +4,11 @@
load 'superstore/tasks/ks.rake'
end
initializer "superstore.config" do |app|
ActiveSupport.on_load :superstore do
- pathname = Rails.root.join('config', 'superstore.yml')
- if pathname.exist?
+ pathnames = [Rails.root.join('config', 'superstore.yml'), Rails.root.join('config', 'cassandra.yml')]
+ if pathname = pathnames.detect(&:exist?)
config = YAML.load(pathname.read)
if config = config[Rails.env]
self.config = config.symbolize_keys!
else