Commit 14f9380951afde4a5cee556a6e95050d592add18
1 parent
8ce4e158
Exists in
master
and in
1 other branch
App: don't obliterate app.==
Mongoid defines it's own ==() and eql?() methods that are based on the ObjectId. Comparable provides it's own ==() function that uses `<=>` under the hood. == is used when inserting into a Hash, App docuemnts are put in hashes hundreds of times per request. We don't was to to call <=> hundreds of time. Putting the Comparable mixin at the top allows the mongoid mixin to override == with it's faster implementation.
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats