trogdir_models 0.1.2 → 0.2.0

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: 80233da71ac3d3bf5357cca18d7ff05b0039b792
4
- data.tar.gz: 9159cd72f2f3f277f88b1c81b7eefd5147271013
3
+ metadata.gz: edb9470ea04be61ae4649b4e2027be09a40b620b
4
+ data.tar.gz: 0aeeead1af33652a0d7c86412ff45fe911459f88
5
5
  SHA512:
6
- metadata.gz: 6e1ed80068eb888db90a807c3f7b15cc240e035c48e31da92d55f5bca99d60ca5277861c4df96c4ab7c1713de5bbf41423ff37163ca2ad5923921e148604a50b
7
- data.tar.gz: ed1117a72b2e69b91c2ce432c7aa4488d688e21e28be1026956d9cf8ab1c9975016df71d47779a60a2a2f335e7112531135b917bfd8db6c9a5cc31602497cc11
6
+ metadata.gz: 089237ffaebb318aa47757e285842332eb196c04b1235c60cc96324f95acd9c01e5a8bd481c6312c3939ee8d22a53fd5b6b58cb526433755cc1e347faa6269f0
7
+ data.tar.gz: 93a5d7f0d5b918614cf354d007468cc2e13d4539316877d2f9ef1e721958573cee016c5f39c837a104d3ba4ea2ae9f00492100182e55040f74080e9a20f68846
@@ -3,5 +3,15 @@ class Changeset
3
3
 
4
4
  has_many :change_syncs
5
5
 
6
+ after_create :create_change_syncs
7
+
6
8
  alias :person :trackable_root
9
+
10
+ private
11
+
12
+ def create_change_syncs
13
+ Syncinator.where(active: true).each do |syncinator|
14
+ change_syncs.create syncinator: syncinator
15
+ end
16
+ end
7
17
  end
@@ -12,7 +12,7 @@ class Syncinator
12
12
  field :access_id, type: Integer
13
13
  field :secret_key, type: String
14
14
  field :queue_changes, type: Boolean
15
- field :active, type: Boolean
15
+ field :active, type: Boolean, default: true
16
16
 
17
17
  attr_readonly :slug, :access_id, :secret_key
18
18
 
@@ -1,3 +1,3 @@
1
1
  module TrogdirModels
2
- VERSION = '0.1.2'
2
+ VERSION = '0.2.0'
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.1.2
4
+ version: 0.2.0
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-03-25 00:00:00.000000000 Z
11
+ date: 2014-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: api-auth