reactive-record 0.7.41 → 0.7.42

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: 8204cd5f1b74a0cee310cdb8400be3cab0a2d14b
4
- data.tar.gz: 9848560e9cb3a3d6462086d807c22f6130a6946b
3
+ metadata.gz: 66241cad77348e9437de2224f7930e774170fab5
4
+ data.tar.gz: ca1302f9e593748bbdf5c282642b3697dad404f4
5
5
  SHA512:
6
- metadata.gz: 9e3f8c5e621ef8c70e7b87aaf21fb5d3b34e8407b99a1de93d314f64fed69f7aa02b027e05f70c121539bff9b427b45c307fc5688d98c554e4d8e726c389d997
7
- data.tar.gz: 8d2ce6815649d8fdc379f3184d5b7bf53b75d963ced3108d60ff1fa049d52b83ff2daaaa26380f63e248f7ed783f07520d700a96f12c252e952992f0049b295c
6
+ metadata.gz: c80d381bfd3852f1250e53bb286d4fa879fbc066715e52aad2e34466970e05a8390ed8d4e1bf6f97e51a6709a5076ce38dca851f3ec9980e0cf3498e8417b5b6
7
+ data.tar.gz: 37ac7b2a27cf7375b1a7714007bb98244b54b751fcd825a86eb4154cdc7ba4da4898e3343d1168e9fc09f890b69a59f7e4e3adad86469c8c91583437cee2b5d7
@@ -84,7 +84,7 @@ module ReactiveRecord
84
84
  end
85
85
  end
86
86
  end
87
- model.all << @ar_instance
87
+ model.all << @ar_instance if ReactiveRecord::Base.class_scopes(model)[:all] # add this only if model.all has been fetched already
88
88
  end
89
89
 
90
90
  def self.find(model, attribute, value)
@@ -57,7 +57,7 @@ module ReactiveRecord
57
57
 
58
58
  def ==(other_collection)
59
59
  observed
60
- return nil unless other_collection.is_a? Collection
60
+ return !@collection unless other_collection.is_a? Collection
61
61
  other_collection.observed
62
62
  my_collection = (@collection || []).select { |target| target != @dummy_record }
63
63
  other_collection = (other_collection ? (other_collection.collection || []) : []).select { |target| target != other_collection.dummy_record }
@@ -110,7 +110,7 @@ module ReactiveRecord
110
110
  @dummy_record = @collection.detect { |r| r.backing_record.vector.last =~ /^\*[0-9]+$/ }
111
111
  @dummy_collection = nil
112
112
  end
113
- notify_of_change
113
+ notify_of_change self
114
114
  end
115
115
 
116
116
  [:first, :last].each do |method|
@@ -192,11 +192,7 @@ module ReactiveRecord
192
192
  end
193
193
 
194
194
  def notify_of_change(value = nil)
195
- begin
196
195
  React::State.set_state(self, "collection", collection) unless ReactiveRecord::Base.data_loading?
197
- rescue Exception => e
198
- `debugger`
199
- end
200
196
  value
201
197
  end
202
198
 
@@ -1,3 +1,3 @@
1
1
  module ReactiveRecord
2
- VERSION = "0.7.41"
2
+ VERSION = "0.7.42"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reactive-record
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.41
4
+ version: 0.7.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mitch VanDuyn
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-03 00:00:00.000000000 Z
11
+ date: 2016-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails