nali 0.3.8 → 0.3.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -65,11 +65,13 @@ module EventMachine
65
65
 
66
66
  def sync( *models )
67
67
  models.flatten.compact.each do |model|
68
- params, relations = model.get_sync_params( self )
69
- if not params.empty? and ( watch_time( model ) < model.updated_at.to_f or model.destroyed? )
70
- if model.destroyed? then unwatch( model ) else watch_time_up model end
71
- relations.each { |relation| sync relation }
72
- send_json action: :sync, params: params
68
+ if watch_time( model ) < model.updated_at.to_f or model.destroyed?
69
+ params, relations = model.get_sync_params( self )
70
+ unless params.empty?
71
+ if model.destroyed? then unwatch( model ) else watch_time_up model end
72
+ relations.each { |relation| sync relation }
73
+ send_json action: :sync, params: params
74
+ end
73
75
  end
74
76
  end
75
77
  self
@@ -1,5 +1,5 @@
1
1
  module Nali
2
2
 
3
- VERSION = '0.3.8'
3
+ VERSION = '0.3.9'
4
4
 
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nali
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.8
4
+ version: 0.3.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-12-21 00:00:00.000000000 Z
12
+ date: 2014-12-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thin