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

Commit

Permalink
Attempt to fix inefficient sort in mongo query
Browse files Browse the repository at this point in the history
  • Loading branch information
mrmemes-eth committed Feb 24, 2012
1 parent 28fdf6c commit 16caf00
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/session.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Session
SHORTS_TIL_LONG = 3

def self.retrieve(session)
any_of({name: session}, {custom: session}).first || create(custom: session)
any_of({name: session}, {custom: session})[0] || create(custom: session)
end

def custom=(name)
Expand Down

0 comments on commit 16caf00

Please sign in to comment.