Skip to content

Commit

Permalink
Fix database connection setting
Browse files Browse the repository at this point in the history
  • Loading branch information
lloydwatkin committed Apr 9, 2024
1 parent 50bc9ff commit 1c423cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions lib/active_record/connection_adapters/janus_mysql2_adapter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/janus/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ module Janus
unless defined?(::Janus::VERSION)
module VERSION
MAJOR = 0
MINOR = 1
MINOR = 3
PATCH = 0
PRE = nil

Expand Down

0 comments on commit 1c423cd

Please sign in to comment.