diff --git a/lib/active_record/connection_adapters/janus_mysql2_adapter.rb b/lib/active_record/connection_adapters/janus_mysql2_adapter.rb index 4b31d48..b4a5169 100644 --- a/lib/active_record/connection_adapters/janus_mysql2_adapter.rb +++ b/lib/active_record/connection_adapters/janus_mysql2_adapter.rb @@ -28,6 +28,11 @@ def initialize(*args) @replica_config = args[0][:janus]['replica'] args[0] = args[0][:janus]['primary'] + if args[0]['database'].nil? + args[0]['database'] = nil + @replica_config['database'] = nil + end + super(*args) @connection_parameters ||= args[0] update_config diff --git a/lib/janus/version.rb b/lib/janus/version.rb index 518dd08..06cf6e6 100644 --- a/lib/janus/version.rb +++ b/lib/janus/version.rb @@ -4,7 +4,7 @@ module Janus unless defined?(::Janus::VERSION) module VERSION MAJOR = 0 - MINOR = 1 + MINOR = 3 PATCH = 0 PRE = nil