File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
lib/active_record/connection_adapters Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -766,9 +766,12 @@ def connect
766766 when :adonet
767767 System ::Data ::SqlClient ::SqlConnection . new . tap do |connection |
768768 connection . connection_string = System ::Data ::SqlClient ::SqlConnectionStringBuilder . new . tap do |cs |
769- cs . user_i_d = config [ :username ] if config [ :username ]
770- cs . password = config [ :password ] if config [ :password ]
771- cs . integrated_security = true if config [ :integrated_security ] == 'true'
769+ if config [ :integrated_security ] == 'true'
770+ cs . integrated_security = true
771+ else
772+ cs . user_i_d = config [ :username ]
773+ cs . password = config [ :password ]
774+ end
772775 cs . add 'Server' , config [ :host ] . to_clr_string
773776 cs . initial_catalog = config [ :database ]
774777 cs . multiple_active_result_sets = false
You can’t perform that action at this time.
0 commit comments