Using Rack Middleware in Rails3
I was just looking into including some Rack middleware in my Rails 3 app. One thing confused me slightly. There seems to be two ways that you can include middleware in you app:-
1. config.ru
2. application.rb
Note: I'm using the codehighlighter rack middleware for this example.
I'm not sure what is the recommended way, however, I think it seems best placed in the config.ru file (since this file is directly related to Rack). In the Rails edge documentation it says that you should use the config.middleware method in the "environment.rb" file... surely this couldn't be right?


Recent comments
1 year 23 weeks ago
1 year 23 weeks ago
1 year 25 weeks ago
1 year 27 weeks ago
1 year 42 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 45 weeks ago
1 year 46 weeks ago
1 year 48 weeks ago