redis-memo 0.0.0.beta.5 → 0.0.0.beta.6

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
  SHA256:
3
- metadata.gz: ee7d2004ee718072b93ece80d2e98b038b9f4a21cd73632c1df4a3609f11e9e4
4
- data.tar.gz: c8a89bb39f5b3e9f5a8b571942045c7b6b147a1d3e925f71ae611944c6aa13c9
3
+ metadata.gz: 10f721bc9b55f26c51674ce16f120bc643c306748dd9ff5aa5f54a7d9b944b51
4
+ data.tar.gz: 3cf3fefe9a5119d231bf973da22aa7787fcac1cf71f46ab0cadc5421cc82da52
5
5
  SHA512:
6
- metadata.gz: 15527040749e75dd0f27c31ecf08867cc63066b7582cdc4d618e269b2e9cb63e35601596d8f03900e55c192a20afd717c8b105426d5511df2c5db1906b4777e5
7
- data.tar.gz: 1ab368f33e5a17209e28efbe2086a067e9f016443b28d56ece0499f557e15fcb3d801930af535d3d1fe1e1eb125b8f2595e694a71a5476c862201e5886cb826c
6
+ metadata.gz: a576fa80cef7462769055bdf657e0ee0f70fc9fb63a08f5b4ceabb931faaa8c6c8d310f01424c2124c7842b00d3c069d7c31499fc4dff166544e85b52989d0bd
7
+ data.tar.gz: 45cc8638df93f0c22fd050ad39b25fd1d8671ac309fbee8e41979d51e0a6136e7c98d9fc9a31acd9e1e1828c592f5b2068349f6a0e1bb294664fcacea8911f48
@@ -126,6 +126,7 @@ class RedisMemo::MemoizeQuery::Invalidation
126
126
  if columns_to_update
127
127
  RedisMemo::MemoizeQuery::Invalidation.send(
128
128
  :select_by_columns,
129
+ model_class,
129
130
  records,
130
131
  columns_to_update,
131
132
  )
@@ -157,8 +158,9 @@ class RedisMemo::MemoizeQuery::Invalidation
157
158
  end
158
159
  end
159
160
 
160
- def self.select_by_columns(records, columns_to_update)
161
- model_class = records.first.class
161
+ def self.select_by_columns(model_class, records, columns_to_update)
162
+ return [] if records.empty?
163
+
162
164
  or_chain = nil
163
165
  columns_to_select = columns_to_update & RedisMemo::MemoizeQuery
164
166
  .memoized_columns(model_class)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: redis-memo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.beta.5
4
+ version: 0.0.0.beta.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chan Zuckerberg Initiative