mirror of
https://github.com/github/rails.git
synced 2026-01-30 16:58:15 -05:00
Made sure that connections are only removed for SQLite
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5955 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
@@ -90,8 +90,10 @@ module ActiveRecord
|
||||
# Clears the cache which maps classes
|
||||
def clear_reloadable_connections!
|
||||
@@active_connections.each do |name, conn|
|
||||
conn.disconnect! if conn.supports_reloading?
|
||||
@@active_connections.delete(name)
|
||||
if conn.requires_reloading?
|
||||
conn.disconnect!
|
||||
@@active_connections.delete(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ module ActiveRecord
|
||||
|
||||
# Returns true if its safe to reload the connection between requests for development mode.
|
||||
# This is not the case for Ruby/MySQL and it's not necessary for any adapters except SQLite.
|
||||
def supports_reloading?
|
||||
def requires_reloading?
|
||||
false
|
||||
end
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@ module ActiveRecord
|
||||
true
|
||||
end
|
||||
|
||||
def supports_reloading?
|
||||
def requires_reloading?
|
||||
true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user