diff options
author | Matthew Draper <matthew@trebex.net> | 2014-04-03 01:41:34 +1030 |
---|---|---|
committer | Matthew Draper <matthew@trebex.net> | 2014-04-03 01:41:34 +1030 |
commit | 0a99fddc140d8aa54a8922e745624a250877658b (patch) | |
tree | 12ec5f1c392c927ae13b8fe889350de61b056942 /activerecord/lib | |
parent | f846828dae77696daea3bafd91a25a62977be481 (diff) | |
download | rails-0a99fddc140d8aa54a8922e745624a250877658b.tar.gz rails-0a99fddc140d8aa54a8922e745624a250877658b.tar.bz2 rails-0a99fddc140d8aa54a8922e745624a250877658b.zip |
Complete change of `sqlite3:///` path handling
That which was now relative is now absolute.
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/connection_specification.rb | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/connection_specification.rb b/activerecord/lib/active_record/connection_adapters/connection_specification.rb index 5ede946836..56c533c401 100644 --- a/activerecord/lib/active_record/connection_adapters/connection_specification.rb +++ b/activerecord/lib/active_record/connection_adapters/connection_specification.rb @@ -41,7 +41,6 @@ module ActiveRecord else @query = @uri.query end - @authority = url =~ %r{\A[^:]*://} end # Converts the given URL to a full connection hash. @@ -91,21 +90,8 @@ module ActiveRecord end # Returns name of the database. - # Sqlite3's handling of a leading slash is in transition as of - # Rails 4.1. def database_from_path - if @authority && @adapter == 'sqlite3' - # 'sqlite3:///foo' is relative, for backwards compatibility. - - database_name = uri.path.sub(%r{^/}, "") - - msg = "Paths in SQLite3 database URLs of the form `sqlite3:///path` will be treated as absolute in Rails 4.2. " \ - "Please switch to `sqlite3:#{database_name}`." - ActiveSupport::Deprecation.warn(msg) - - database_name - - elsif @adapter == 'sqlite3' + if @adapter == 'sqlite3' # 'sqlite3:/foo' is absolute, because that makes sense. The # corresponding relative version, 'sqlite3:foo', is handled # elsewhere, as an "opaque". |