Skip to content

Instantly share code, notes, and snippets.

@chechaoyang
Created September 23, 2011 06:34
Show Gist options
  • Save chechaoyang/1236859 to your computer and use it in GitHub Desktop.
Save chechaoyang/1236859 to your computer and use it in GitHub Desktop.
Uploadify with active record sessions store in Rails 3
#
# 这只是针对active_record_store情况下要做的修改,完整的cookie_store mode看这里
# https://github.com/websymphony/Rails3-Paperclip-Uploadify
#
Uploader::Application.config.session_store :active_record_store, :key => '_uploader_session'
Rails.application.config.middleware.insert_before(
Rails.application.config.session_store,
FlashSessionCookieMiddleware,
Rails.application.config.session_options[:key]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment