class User < ApplicationRecord
require "digest"
- require "xml/libxml"
has_many :traces, -> { where(:visible => true) }
has_many :diary_entries, -> { order(:created_at => :desc) }
end
##
- # delete a user - leave the account but purge most personal data
- def delete
+ # destroy a user - leave the account but purge most personal data
+ def destroy
avatar.purge_later
self.display_name = "user_#{id}"