Class: Person
- Inherits:
-
Object
- Object
- Person
- Defined in:
- lib/trogdir/person.rb
Constant Summary collapse
- GENDERS =
[:male, :female]
Instance Method Summary collapse
Instance Method Details
#changesets ⇒ Object
68 69 70 71 72 |
# 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 ⇒ Object
74 75 76 |
# File 'lib/trogdir/person.rb', line 74 def email emails.where(primary: true).first end |