Skip to content

Commit

Permalink
Unsuccessful attempt to add id2 in the EmbeddedDocument
Browse files Browse the repository at this point in the history
  • Loading branch information
phstc committed Jun 22, 2011
1 parent f3d74b2 commit 89fed49
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 45 deletions.
3 changes: 2 additions & 1 deletion lib/mongomapper_id2.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ def auto_increment! options = {:override => false}
module InstanceMethods
private
def update_auto_increment
puts 'VSF2---'
self.id2 = MongomapperId2::Incrementor[self.class.name].inc
end
def update_auto_increment_override
Expand All @@ -30,4 +31,4 @@ def update_auto_increment_override
end

MongoMapper::Document.plugin(MongoMapper::Plugins::AutoIncrement)
MongoMapper::EmbeddedDocument.plugin(MongoMapper::Plugins::AutoIncrement)
# MongoMapper::EmbeddedDocument.plugin(MongoMapper::Plugins::AutoIncrement)
44 changes: 0 additions & 44 deletions test/functional/test_auto_increment.rb

This file was deleted.

0 comments on commit 89fed49

Please sign in to comment.