aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/connection_specification.rb
diff options
context:
space:
mode:
authorschneems <richard.schneeman@gmail.com>2014-03-11 22:23:21 -0500
committerschneems <richard.schneeman@gmail.com>2014-03-14 11:33:54 -0500
commit7f17019e079bb9e6352f11d537633ddf10ea5903 (patch)
tree979465bd8ac90c9ef3d7225d6050252e62635826 /activerecord/lib/active_record/connection_adapters/connection_specification.rb
parenteaa19cc5761f8f86fb37683984d385a8707ad8b3 (diff)
downloadrails-7f17019e079bb9e6352f11d537633ddf10ea5903.tar.gz
rails-7f17019e079bb9e6352f11d537633ddf10ea5903.tar.bz2
rails-7f17019e079bb9e6352f11d537633ddf10ea5903.zip
Allow custom JDBC urls
mitigates #14323
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/connection_specification.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/connection_specification.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/connection_specification.rb
index 3f8b14bf67..9a133168f8 100644
--- a/activerecord/lib/active_record/connection_adapters/connection_specification.rb
+++ b/activerecord/lib/active_record/connection_adapters/connection_specification.rb
@@ -237,8 +237,8 @@ module ActiveRecord
# hash and merges with the rest of the hash.
# Connection details inside of the "url" key win any merge conflicts
def resolve_hash_connection(spec)
- if url = spec.delete("url")
- connection_hash = resolve_string_connection(url)
+ if spec["url"] && spec["url"] !~ /^jdbc:/
+ connection_hash = resolve_string_connection(spec.delete("url"))
spec.merge!(connection_hash)
end
spec