class Person

Constants

GENDERS

Public Instance Methods

changesets() click to toggle source
# File lib/trogdir/person.rb, line 68
def changesets
  # association_hash is provided by Mongoid::History::Trackable
  # history_tracks would only get changes to the 'person' scope this also gets changes to associated models
  Mongoid::History.tracker_class.where(association_chain: association_hash)
end
email() click to toggle source
# File lib/trogdir/person.rb, line 74
def email
  emails.where(primary: true).first
end

Private Instance Methods

set_uuid() click to toggle source
# File lib/trogdir/person.rb, line 82
def set_uuid
  self.uuid = SecureRandom.uuid
end