Permalink
Browse files

can be configured via vars

  • Loading branch information...
1 parent a8f1b04 commit 630af455637ecb5f03982796111b2223425a0129 Karl Seguin committed Feb 17, 2011
Showing with 3 additions and 3 deletions.
  1. +3 −3 lib/settings.rb
View
@@ -2,12 +2,12 @@ class Settings
@@settings = YAML::load_file(Rails.root + 'config/config.yml') || Hash.new
def self.local_only?
- @@settings.has_key?('local_only') ? @@settings['local_only'] : true
+ @@settings.has_key?('local_only') ? @@settings['local_only'] : ENV['LOCAL_ONLY'] || true
end
def self.auto_connect
- @@settings['auto_connect']
+ @@settings['auto_connect'] || ENV['MONGO_URL']
end
def self.databases
- @@settings['databases']
+ @@settings['databases'] || ENV['MONGO_DATABASES']
end
end

0 comments on commit 630af45

Please sign in to comment.