I'm updating an application to Rails 3 that has Uploadify implemented as described by John Nunemaker here: http://railstips.org/blog/archives/2009/07/21/uploadify-and-rails23/
My questions are:
1) Where should middleware live in a Rails 3 application? app/middleware?
2) Is the middleware path loaded in config/application.rb? Or is there a way to do it in config/environment.rb?
3) What should I update the following code to to make it work in Rails 3?
ActionController::Dispatcher.middleware.insert_before( ActionController::Session::CookieStore, FlashSessionCookieMiddleware, ActionController::Base.session_options[:key] )
Specifically, how do I call each of the following:
- ActionController::Dispatcher.middleware.insert_before - ActionController::Session::CookieStore - ActionController::Base.session_options[:key]
I've looked through the Rails 3 source, and tried various combinations e.g., ActionDispatch::Cookies, ActionDispatch::Middleware::Cookies, ActionController.cookies, etc., but to no avail.