Module: Mongoid::Orderable

Extended by:
ActiveSupport::Concern
Defined in:
lib/mongoid/orderable.rb,
lib/mongoid/orderable/version.rb,
lib/mongoid/orderable/installer.rb,
lib/mongoid/orderable/handlers/base.rb,
lib/mongoid/orderable/mixins/helpers.rb,
lib/mongoid/orderable/mixins/movable.rb,
lib/mongoid/orderable/generators/base.rb,
lib/mongoid/orderable/mixins/listable.rb,
lib/mongoid/orderable/generators/scope.rb,
lib/mongoid/orderable/mixins/callbacks.rb,
lib/mongoid/orderable/handlers/document.rb,
lib/mongoid/orderable/generators/helpers.rb,
lib/mongoid/orderable/generators/movable.rb,
lib/mongoid/orderable/mixins/cascadeable.rb,
lib/mongoid/orderable/generators/listable.rb,
lib/mongoid/orderable/generators/position.rb,
lib/mongoid/orderable/configs/field_config.rb,
lib/mongoid/orderable/handlers/transaction.rb,
lib/mongoid/orderable/configs/global_config.rb,
lib/mongoid/orderable/errors/transaction_failed.rb,
lib/mongoid/orderable/generators/lock_collection.rb,
lib/mongoid/orderable/handlers/document_embedded.rb,
lib/mongoid/orderable/errors/invalid_target_position.rb,
lib/mongoid/orderable/handlers/document_transactional.rb

Defined Under Namespace

Modules: Configs, Errors, Generators, Handlers, Mixins Classes: Installer

Constant Summary collapse

MUTEX =
Mutex.new
VERSION =
'6.0.5'

Class Method Summary collapse

Class Method Details

.configObject



12
13
14
# File 'lib/mongoid/orderable.rb', line 12

def config
  @config || MUTEX.synchronize { @config = ::Mongoid::Orderable::Configs::GlobalConfig.new }
end

.configure {|config| ... } ⇒ Object

Yields:



8
9
10
# File 'lib/mongoid/orderable.rb', line 8

def configure
  yield(config) if block_given?
end