Permalink
Browse files

fix for newer versions of rack

  • Loading branch information...
1 parent 9422894 commit 37ef64ce48a910deddc921fdae32f81794dcc83b @nicolaracco committed Mar 21, 2012
Showing with 4 additions and 4 deletions.
  1. +1 −1 lib/mongo_session_store/mongo_mapper.rb
  2. +3 −3 lib/mongo_session_store/mongoid.rb
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

0 comments on commit 37ef64c

Please sign in to comment.