marty 2.7.2 → 2.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/models/marty/data_grid.rb +9 -4
- data/lib/marty/version.rb +1 -1
- data/spec/models/data_grid_spec.rb +5 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f0011e12fd48a4e14d470ba22c2293428a0607316a8b278ffec4d651deaa0e3
|
4
|
+
data.tar.gz: 49430e4e1cf9936c10d42cdb6fd0d71ac45856c53c9f28330a8ceb1d97e2cc71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56459fc03c3ed9a6240cb7bf593bb6e0ced8badfa6eb665f1b51289bbdb6bae1dcf17ce545ebbd490dd4cc452da008e77395610409fc4cdc8c8f88c548102952
|
7
|
+
data.tar.gz: 28893152b14ece8002bccfbb6c90077b5018764c6343fadd4e469e68721dfd32a9e65f8d29e682c85ae42411e2685fed3947681a28e132a9a2c123abe431d444
|
data/Gemfile.lock
CHANGED
@@ -222,11 +222,16 @@ class Marty::DataGrid < Marty::Base
|
|
222
222
|
raise "#{dgn} grid not found" unless dgh
|
223
223
|
raise "non-hash arg #{h}" unless Hash === h
|
224
224
|
|
225
|
-
|
225
|
+
if dgh['data_type'] != 'Marty::DataGrid'
|
226
|
+
# Narrow hash to needed attrs -- makes the cache work a lot
|
227
|
+
# better in case the hash includes items not in grid
|
228
|
+
# attrs. Can't do this for multi-grids since they pass down
|
229
|
+
# their params.
|
230
|
+
attrs = dgh['metadata'].map { |a| a['attr'] }
|
231
|
+
h = h.slice(*attrs)
|
232
|
+
end
|
226
233
|
|
227
|
-
|
228
|
-
# in case the hash includes items not in grid attrs.
|
229
|
-
lookup_grid_h_priv(pt, dgh, h.slice(*attrs), distinct)
|
234
|
+
lookup_grid_h_priv(pt, dgh, h, distinct)
|
230
235
|
end
|
231
236
|
|
232
237
|
# private method used to cache lookup_grid_distinct_entry_h result
|
data/lib/marty/version.rb
CHANGED
@@ -578,6 +578,11 @@ describe 'lookups for infinity' do
|
|
578
578
|
res = lookup_grid_helper('infinity', 'G8', h, true)
|
579
579
|
|
580
580
|
expect(g1_res).to eq res
|
581
|
+
|
582
|
+
# make sure lookup_grid_h works too
|
583
|
+
res_h = Marty::DataGrid.lookup_grid_h('infinity', 'G8', h, true)
|
584
|
+
|
585
|
+
expect(g1_res[0]).to eq res_h
|
581
586
|
end
|
582
587
|
|
583
588
|
it 'should handle DataGrid typed data grids' do
|