Module: ActsAsList::Mongoid::Triggers

Defined in:
lib/mongoid/acts_as_list.rb

Instance Method Summary collapse

Instance Method Details

#after_parentizeObject



381
382
383
# File 'lib/mongoid/acts_as_list.rb', line 381

def after_parentize
  # should register on root element to be called when root is saved first time!?
end

#init_list_item!Object



385
386
387
388
389
# File 'lib/mongoid/acts_as_list.rb', line 385

def init_list_item!
  self['created_at'] = Time.now
  self['updated_at'] = Time.now
  add_to_list_bottom unless in_list?
end