Module: Mongoid::IntegerId::ClassMethods

Defined in:
lib/mongoid_integer_id/integer_id.rb

Instance Method Summary collapse

Instance Method Details

#auto_increment(collection_name = nil, options = {}) ⇒ Object



21
22
23
# File 'lib/mongoid_integer_id/integer_id.rb', line 21

def auto_increment(collection_name = nil, options = {})
  self.sequence_collection_name = collection_name.try(:to_s) { |c| c.collectionize } || :sequences
end