Created
April 19, 2010 17:25
-
-
Save toyflish/371318 to your computer and use it in GitHub Desktop.
rails 2.3.5, Activerecord-sessionstore takes session-id from get-vars if passed by shockwave flash (uploadify) using rack-middleware
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# part of config/enviroment.rb | |
... | |
Rails::Initializer.run do |config| | |
# Load model files from sub folders | |
config.load_paths += Dir["#{RAILS_ROOT}/app/models/*"].find_all { |f| File.stat(f).directory? } | |
# Load middleware - initially used by flash-session-hack | |
config.load_paths << "#{RAILS_ROOT}/app/middleware" | |
.... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this file should sit at config/initializers/flash_session_middleware.rb | |
ActionController::Dispatcher.middleware.insert_before( | |
ActiveRecord::SessionStore, | |
FlashSessionCookieMiddleware, | |
ActionController::Base.session_options[:session_key] | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How can I use that middleware for Rails 3?