lib/databasedotcom/rails/controller.rb in databasedotcom-rails-1.0.0 vs lib/databasedotcom/rails/controller.rb in databasedotcom-rails-1.1.0

- old
+ new

@@ -3,9 +3,10 @@ module Controller module ClassMethods def dbdc_client unless @dbdc_client config = YAML.load_file(File.join(::Rails.root, 'config', 'databasedotcom.yml')) + config = config.has_key?(::Rails.env) ? config[::Rails.env] : config username = config["username"] password = config["password"] @dbdc_client = Databasedotcom::Client.new(config) @dbdc_client.authenticate(:username => username, :password => password) end