Class: Mongoid::Orderable::Handlers::DocumentTransactional

Inherits:
Document
  • Object
show all
Defined in:
lib/mongoid/orderable/handlers/document_transactional.rb

Instance Attribute Summary

Attributes inherited from Base

#doc

Instance Method Summary collapse

Methods inherited from Document

#after_destroy, #after_update, #before_update

Methods inherited from Base

#initialize

Constructor Details

This class inherits a constructor from Mongoid::Orderable::Handlers::Base

Instance Method Details

#after_createObject



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

def after_create
  apply_all_positions
  super
end

#before_createObject



7
8
9
# File 'lib/mongoid/orderable/handlers/document_transactional.rb', line 7

def before_create
  set_new_record_positions
end