Module: Mongoid::Userstamps::Deleted

Extended by:
ActiveSupport::Concern
Defined in:
lib/mongoid/userstamps/deleted.rb

Instance Method Summary collapse

Instance Method Details

#set_deleted_byObject



20
21
22
23
24
# File 'lib/mongoid/userstamps/deleted.rb', line 20

def set_deleted_by
  user = self.class.current_user
  return if !user || public_send("#{userstamps_config.deleted_name}_id_changed?")
  public_send("#{userstamps_config.deleted_name}=", user)
end