Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix for newer versions of rack

  • Loading branch information...
commit 37ef64ce48a910deddc921fdae32f81794dcc83b 1 parent 9422894
@nicolaracco authored
View
2  lib/mongo_session_store/mongo_mapper.rb
@@ -30,7 +30,7 @@ def get_session(env, sid)
[sid, unpack(session.data)]
end
- def set_session(env, sid, session_data)
+ def set_session(env, sid, session_data, options = {})
record = env[SESSION_RECORD_KEY] ||= find_session(sid)
record.data = pack(session_data)
# Rack spec dictates that set_session should return true or false
View
6 lib/mongo_session_store/mongoid.rb
@@ -3,7 +3,7 @@
module ActionDispatch
module Session
class MongoidStore < AbstractStore
-
+
class Session
include Mongoid::Document
include Mongoid::Timestamps
@@ -30,7 +30,7 @@ def get_session(env, sid)
[sid, unpack(session.data)]
end
- def set_session(env, sid, session_data)
+ def set_session(env, sid, session_data, options = {})
record = env[SESSION_RECORD_KEY] ||= find_session(sid)
record.data = pack(session_data)
# Rack spec dictates that set_session should return true or false
@@ -53,7 +53,7 @@ def unpack(packed)
return nil unless packed
Marshal.load(packed.unpack("m*").first)
end
-
+
end
end
end
Please sign in to comment.
Something went wrong with that request. Please try again.