trogdir_models 0.7.5 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trogdir/person.rb +5 -1
- data/lib/trogdir_models/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bed5a8bae8f6ae7d42f380aabdde8994aa545410
|
4
|
+
data.tar.gz: 727ff635da38945e033908df6cd7aa5d76fa6b0c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e502de573370d6eab02a338eff4c7ebaf4d9291c117bf7df705488b2134ea61e0e2d7d20bbd995cb70ba4de7de66ef974a5afdd544e21564342a2f91a85ac78f
|
7
|
+
data.tar.gz: cc3cbe147a7ea0e5bdd3f0f6099e73dc063a06073b2fd078221a3a48b50d96d6b42672f96f6b5ccd836315830897c613ddbc475903f0e62b08d84b6b3c4c21f5
|
data/lib/trogdir/person.rb
CHANGED
@@ -62,7 +62,11 @@ class Person
|
|
62
62
|
|
63
63
|
before_validation :set_uuid, on: :create
|
64
64
|
|
65
|
-
|
65
|
+
def changesets
|
66
|
+
# association_hash is provided by Mongoid::History::Trackable
|
67
|
+
# history_tracks would only get changes to the 'person' scope this also gets changes to associated models
|
68
|
+
Mongoid::History.tracker_class.where(association_chain: association_hash)
|
69
|
+
end
|
66
70
|
|
67
71
|
def email
|
68
72
|
emails.where(primary: true).first
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trogdir_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Crownoble
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: api-auth
|