diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-11 11:47:45 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2012-05-12 09:38:01 +0200 |
commit | d2855043c53bd4f84a4ca425947948fd31a93432 (patch) | |
tree | 4db9212544efe93fbd1ebadcd642af5607eb3879 /lib/evendoors/particle.rb | |
parent | 1985e84383540100d797579f88c6d1ce072e1463 (diff) | |
download | edoors-ruby-d2855043c53bd4f84a4ca425947948fd31a93432.zip edoors-ruby-d2855043c53bd4f84a4ca425947948fd31a93432.tar.gz |
Particle relies on spin field to resolve src and dst not parent
Diffstat (limited to 'lib/evendoors/particle.rb')
-rw-r--r-- | lib/evendoors/particle.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/evendoors/particle.rb b/lib/evendoors/particle.rb index 161c164..2d024fd 100644 --- a/lib/evendoors/particle.rb +++ b/lib/evendoors/particle.rb @@ -43,12 +43,12 @@ module EvenDoors @door = o['door'] @action = o['action'] @payload = o['payload']||{} - @src = o['parent'].spin.search_down o['src'] if o['src'] - @dst = o['parent'].spin.search_down o['dst'] if o['dst'] + @src = o['spin'].search_down o['src'] if o['src'] + @dst = o['spin'].search_down o['dst'] if o['dst'] o['dsts'].each do |dst| add_dsts dst end if o['dsts'] set_link_fields *o['link_fields'] if o['link_fields'] o['merged'].each do |particle| - merge! Particle.json_create(particle.merge!('parent'=>o['parent'])) + merge! Particle.json_create(particle.merge!('spin'=>o['spin'])) end if o['merged'] end end |