mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
start_with?
allows multiple prefix values
This commit is contained in:
parent
58ccc09d83
commit
af9c910db7
1 changed files with 1 additions and 1 deletions
|
@ -42,7 +42,7 @@ module ActiveRecord
|
||||||
# Return a Hash that can be merged into the main config that represents
|
# Return a Hash that can be merged into the main config that represents
|
||||||
# the passed in url
|
# the passed in url
|
||||||
def build_url_hash
|
def build_url_hash
|
||||||
if url.nil? || %w(jdbc: http: https:).any? { |protocol| url.start_with?(protocol) }
|
if url.nil? || url.start_with?("jdbc:", "http:", "https:")
|
||||||
{ url: url }
|
{ url: url }
|
||||||
else
|
else
|
||||||
ConnectionUrlResolver.new(url).to_hash
|
ConnectionUrlResolver.new(url).to_hash
|
||||||
|
|
Loading…
Reference in a new issue