state-notifier 0.0.4 → 0.0.5

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: a8eb994be65967af0b211747081962ddabf012f8
4
- data.tar.gz: 45875129591b507a155fb2fec078a90b53878cbd
3
+ metadata.gz: b8ed956490ad32c8faecc84aee9bb8db94196a26
4
+ data.tar.gz: 777a2ba40ff270a9382ff88f9c5dda5e87983296
5
5
  SHA512:
6
- metadata.gz: f64fb11572cf4a45e43e2ed61eb07d924aaa4a93128ee35e5cda4268bcbde9baff91edd353b4744432a754bde583e996ac8674fb67c80d09a9359c31c9d007b0
7
- data.tar.gz: 22995a9f801ce69d77c3ce9e4f1c645537a09a201f0fa832eeea8c62765b960c6768e6a7393d1c808f5017ae8bc85462454c48b2ec9cf8e7f4170e7b60cab215
6
+ metadata.gz: b034c246058e029499738f24a93f370606c732eeea6ea25c5697f76a61e3227e511802f692dbd4e7d754ba1c3c60696b95861dd4d376e410cc1235077ea1eb8c
7
+ data.tar.gz: 4db16ec677537145bbdfb47aae523139ad1171e2dae96e40a112e6aeb0a53cc7088e8325e78c54cea71b39f12f214d6d2b89bf6b580ac6110fc7ec349158429a
@@ -1,5 +1,5 @@
1
1
  module State
2
2
  module Notifier
3
- VERSION = "0.0.4"
3
+ VERSION = "0.0.5"
4
4
  end
5
5
  end
@@ -29,9 +29,11 @@ module State
29
29
  included do
30
30
  after_create {notify_targets :created}
31
31
  after_update {notify_targets :updated unless (changed - self.class.reserved_attributes).empty?}
32
- if respond_to?(:state_machine)
33
- state_machine do
34
- after_transition { |record, transition| record.notify_transition transition }
32
+ if respond_to?(:state_machines) && respond_to?(:state_machine)
33
+ state_machines.keys.each do |machine|
34
+ state_machine machine do
35
+ after_transition { |record, transition| record.notify_transition transition }
36
+ end
35
37
  end
36
38
  end
37
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: state-notifier
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vitaly Kushner