railscasts.com
02 Jun '12, 8pm
Rack Middlewares:
To demonstrate Rack Middleware we’re going to use the simple e-commerce application seen in previous episodes. We’d like to know how long each request takes to process so we’re going to use Middleware to inject an HTML comment into each page that contains the processing time. This is probably not something you’re going to want to do in a production Rails application, but it will provide a good demonstration on how Middleware can intercept a request and response and change an application’s behaviour.
Full article:
http://railscasts.com/episodes/151-rack-middleware?view=a...