Created
June 29, 2011 18:18
-
-
Save tyabe/1054490 to your computer and use it in GitHub Desktop.
Rails-3.0.3 + jpmobile-0.1.4 ( + devise-1.1.5 ) でCookie非対応の携帯でログインできるようにするパッチ
This file contains hidden or 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
# | |
# config/initializers配下におく | |
# | |
if defined?(Jpmobile) | |
class ActionDispatch::Request | |
def reset_session | |
session.destroy if session && session.respond_to?(:destroy) | |
@env['action_dispatch.request.flash_hash'] = nil | |
# session.inspect を挟むと session_options[:id] で | |
# セッションIDが取得できるようになる? | |
session.inspect | |
self.session = {} | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment