Permalink
Browse files

ObjectID -> ObjectId

  • Loading branch information...
1 parent 77238b6 commit fbd704bd739e9603317e49aa5673d5837f7dfdd7 mattbeedle committed with nmerouze Sep 26, 2010
Showing with 4 additions and 4 deletions.
  1. +2 −2 lib/mongo_session_store/mongo_mapper.rb
  2. +2 −2 lib/mongo_session_store/mongoid.rb
@@ -20,7 +20,7 @@ class Session
private
def generate_sid
- BSON::ObjectID.new
+ BSON::ObjectId.new
end
def get_session(env, sid)
@@ -42,7 +42,7 @@ def set_session(env, sid, session_data)
def find_session(id)
@@session_class.find(id) ||
@@session_class.new(:id=>id)
- rescue BSON::InvalidObjectID
+ rescue BSON::InvalidObjectId
@@session_class.new(:id => generate_sid)
end
@@ -20,7 +20,7 @@ class Session
private
def generate_sid
- BSON::ObjectID.new
+ BSON::ObjectId.new
end
def get_session(env, sid)
@@ -40,7 +40,7 @@ def set_session(env, sid, session_data)
end
def find_session(id)
- id = BSON::ObjectID.from_string(id.to_s)
+ id = BSON::ObjectId.from_string(id.to_s)
@@session_class.first(:conditions => { :_id => id }) ||
@@session_class.new(:id => id)
end

0 comments on commit fbd704b

Please sign in to comment.