Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

self.inc is not working.

A workaround is needed since mongomapper method is increment too and it cannot be aliased there.
  • Loading branch information...
commit 600fcb1fc5037673952e0675ade95db173c4659e 1 parent de98e60
@Serabe authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/sorcery/model/adapters/mongo_mapper.rb
View
2  lib/sorcery/model/adapters/mongo_mapper.rb
@@ -10,7 +10,7 @@ module MongoMapper
module InstanceMethods
def increment(attr)
- self.inc(attr,1)
+ self.class.increment(id, attr => 1)
end
def save!(options = {})
Please sign in to comment.
Something went wrong with that request. Please try again.