Permalink
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...
Serabe committed Jan 24, 2012
1 parent de98e60 commit 600fcb1fc5037673952e0675ade95db173c4659e
Showing with 1 addition and 1 deletion.
  1. +1 −1 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 = {})

0 comments on commit 600fcb1

Please sign in to comment.