lib/config_loader.rb in configloader-0.2.1 vs lib/config_loader.rb in configloader-0.2.2
- old
+ new
@@ -34,15 +34,15 @@
# db_config = ConfigLoader.load('database', 'production')
# db_config['server'] # production.server.com
# db_config['port'] # 5984
# db_config['database_name'] # addressbook_production
#
- # Finally, you can specify the project root too. If you don't, it will assume the project root is RAILS_ROOT. To change it, write:
+ # Finally, you can specify the project root too. If you don't, it will assume the project root is Rails.root. To change it, write:
#
#
# db_config = ConfigLoader.load('database', 'production')
# db_config = ConfigLoader.load('database', 'test', '/home/user/my_special_project_root')
- def self.load(file_name, running_env = Rails.env, project_root = RAILS_ROOT)
+ def self.load(file_name, running_env = Rails.env, project_root = Rails.root.to_s)
ConfigLoader::Map.new(file_name, running_env, project_root).load
end
end