This project is archived and is in readonly mode.

#4493 ✓resolved
Lawrence Pit

ActiveRecord middleware should be inserted before ActionDispatch::Cascade ?

Reported by Lawrence Pit | April 28th, 2010 @ 01:41 AM | in 3.0.2

Using rails 3 beta 3. I have a piece of metal code, and I think it's fair to assume that most users will use some ActiveRecord code in there to retrieve some data.

However, the metal code is run before the middleware ActiveRecord::ConnectionAdapters::ConnectionManagement. I.e., when something fails in the metal code, then the AR connection manager will not get the chance to do: ActiveRecord::Base.clear_active_connections!

I have a few other use cases where I find it would be more useful if middleware ActionDispatch::Cascade was sitting just before MyApp::Application.routes and after ActiveRecord::QueryCache and any other user defined middlewares.

Comments and changes to this ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

<h2 style="font-size: 14px">Tickets have moved to Github</h2>

The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>

Referenced by

Pages