Open
Description
Caused by
The issue appear after changing the class name, let's say
class Documents
include Mongoid::Document
auto_increment :sequence
store_in collection: 'document'
end
here the seq_name = 'documents'
class Document
include Mongoid::Document
auto_increment :sequence
store_in collection: 'document'
end
but here the seq_name = 'document'
Solution
to
seq_name = options[:name] || "#{self.collection.name.downcase}_#{name}"
Note
this will break backward compatibility