From 1af9bd58a04d14dc727713d2e581fafebc0e1d96 Mon Sep 17 00:00:00 2001 From: Tristan Dunn Date: Sun, 9 Aug 2009 16:22:53 -0400 Subject: No longer require database name for MySQL to allow cross database selects. [#1122 state:committed] Signed-off-by: Jeremy Kemper --- .../lib/active_record/connection_adapters/mysql_adapter.rb | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb index 2b882a1f25..2812dbb522 100644 --- a/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb @@ -53,12 +53,7 @@ module ActiveRecord socket = config[:socket] username = config[:username] ? config[:username].to_s : 'root' password = config[:password].to_s - - if config.has_key?(:database) - database = config[:database] - else - raise ArgumentError, "No database specified. Missing argument: database." - end + database = config[:database] # Require the MySQL driver and define Mysql::Result.all_hashes unless defined? Mysql -- cgit v1.2.3