search for: mymiddlewar

Displaying 1 result from an estimated 1 matches for "mymiddlewar".

Did you mean: mymiddleware
2012 Jan 12
0
telling app to use middleware in gem
I have a gem, and part of the gem is a piece of rack middleware. In Rails 2.3, I could make the gem set up the middleware without adding anything to config/*.rb in the app. I did this with the following line: ActionController::Dispatcher.middleware.use ''MyMiddleware'' But in Rails 3, this doesn''t work. I''ve tried putting the following into the gem''s lib/gem_name.rb: Rails.application.config.middleware.use ''MyMiddleware'' But now when I run `rake middleware` I get "undefined method `config''...