#
class User < ApplicationRecord
+ require "digest"
require "xml/libxml"
has_many :traces, -> { where(:visible => true) }
ClientApplication.find_by(:key => application_key).access_token_for_user(self)
end
+ def fingerprint
+ digest = Digest::SHA256.new
+ digest.update(email)
+ digest.update(pass_crypt)
+ digest.hexdigest
+ end
+
private
def set_defaults