Skip to content
This repository has been archived by the owner on Apr 17, 2018. It is now read-only.

Commit

Permalink
Don't completely remove #destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
d11wtq committed Oct 20, 2011
1 parent 696032a commit 49a1790
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/dm-rails/session_store.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,13 @@ def find_session(sid)
self.class.session_class.first_or_new(:session_id => sid)
end

def destroy_session(env, sid, options = {})
find_session(current_session_id(env)).destroy
def destroy_session(env, sid = nil, options = {})
sid ||= current_session_id(env)
find_session(sid).destroy
end

def destroy(env)
destroy_session(env)
end

end
Expand Down

0 comments on commit 49a1790

Please sign in to comment.