Module: Mongoid::Sequence2

Defined in:
lib/mongoid-sequence2.rb,
lib/mongoid-sequence2/version.rb

Constant Summary collapse

VERSION =
"0.3.1"
@@collection_name =
:__sequences
@@session =
:default

Class Method Summary collapse

Class Method Details

.setup {|_self| ... } ⇒ Object

Allow configuring Mongoid::Sequence2 with a block now provide the specific custom default storage options for ‘Mongoid::Sequences`

Example:

Mongoid::Sequence2.setup do |config|
  config.session = :default
  config.collection   = :__sequences
end

Yields:

  • (_self)

Yield Parameters:



28
29
30
# File 'lib/mongoid-sequence2.rb', line 28

def self.setup
  yield self
end