DHH wrote:
1) change #supports_reloading? to #requires_reloading? (or somesuch),
make it clear that it's an issue of "requiring" a new connection (for
sqlite only).
2) make the change above, such that both the cache is cleared and the
connection dropped ONLY for sqlite.
That should already be the case. The abstract implementation is:
# 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?
false
end
And only SQLite overwrites it.
Agree that it's a blocker. Please do investigate, if you have the time.
Otherwise I'll do when I get around to it.
The problem is that clear_reloadable_connections! is currently defined as:
# 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)
end
end
So it only disconnects for sqlite, BUT removes the connection from the
cache always.
I can provide a patch, just want to make sure I understood what was
intended here.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on
Rails: Core" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---