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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d24c65d59c98428bcf8092f1e79d424ce0491a9e
4
- data.tar.gz: c3a079f9aebb8f516fa9817aa7848c5b1b9b430e
3
+ metadata.gz: bed5a8bae8f6ae7d42f380aabdde8994aa545410
4
+ data.tar.gz: 727ff635da38945e033908df6cd7aa5d76fa6b0c
5
5
  SHA512:
6
- metadata.gz: e4c2dcb2c74c129126d9d5ccfe3a03e8080809bed745a5d0829923efe279fcbb138a1c8ba8938de79a5419ec2538a004c4bfb61032550d761663d71f4d2b98d0
7
- data.tar.gz: d68d55c5199ca5a0a589424bcccda851010bb151ddbe525cc9bdea5399054497a1d76873e3b41fc528cf75b68123db94f917927fd1e0a338c694169ea52673c3
6
+ metadata.gz: e502de573370d6eab02a338eff4c7ebaf4d9291c117bf7df705488b2134ea61e0e2d7d20bbd995cb70ba4de7de66ef974a5afdd544e21564342a2f91a85ac78f
7
+ data.tar.gz: cc3cbe147a7ea0e5bdd3f0f6099e73dc063a06073b2fd078221a3a48b50d96d6b42672f96f6b5ccd836315830897c613ddbc475903f0e62b08d84b6b3c4c21f5
@@ -62,7 +62,11 @@ class Person
62
62
 
63
63
  before_validation :set_uuid, on: :create
64
64
 
65
- alias :changesets :history_tracks
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
@@ -1,3 +1,3 @@
1
1
  module TrogdirModels
2
- VERSION = '0.7.5'
2
+ VERSION = '0.7.6'
3
3
  end
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.5
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-10-17 00:00:00.000000000 Z
11
+ date: 2014-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api-auth