alchemy-json_api 0.22.0 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: cae8005b1598184e56bb18b86ec302ef62b479275e6f0a07c320035e808a0d9b
4
- data.tar.gz: f346c05c8e6f7b6dbf87366f755e376d94abf1db11748f2027197d81d30f24f8
3
+ metadata.gz: 286d51964dbcd1daa66ce3c6ab76c762c41929c65aa4c670bd5ab50e63761e06
4
+ data.tar.gz: e1d00037b288b60f6a482773675a2926f317b01c2f82492ad6b9f8ee82defd0a
5
5
  SHA512:
6
- metadata.gz: 01200d6d1e6924208633453d4bef55e1a710563ec5dd0b6d95338e6ed71141c51ef4270ce70b9482c3774c94949bd143267c3a204d198f0f0cff21c38fc56055
7
- data.tar.gz: ed765c1c38ec22e3c531fa314481d958c89d576c94a0496df52e64ca285c75129d1243ea9efad2a5ce75e232aa067802f134e93bb7318769477e82b7689490f6
6
+ metadata.gz: dd1e2056c485b4de654de4196809f6c7b8e0cdbab027ceb814a7e8ab0e97ad8eb63fecd444caf21bc8aa9b46e1266716b3534ec07871769a42845d2b4220631b
7
+ data.tar.gz: 8303041d11e09785397f318a7371965f85f54955df255fae99c1fd1b558258a2519bd208b5b6171e15945f57c64958ee33045ad2e9ca4f19b2da60266f06bfda
@@ -10,7 +10,7 @@ module Alchemy
10
10
 
11
11
  jsonapi_filter(page_scope, allowed) do |filtered_pages|
12
12
  @pages = filtered_pages.result
13
- if stale?(last_modified: @pages.maximum(:published_at), etag: @pages.max_by(&:cache_key).cache_key)
13
+ if stale?(last_modified: @pages.maximum(:published_at), etag: @pages.max_by(&:cache_key)&.cache_key)
14
14
  # Only load pages with all includes when browser cache is stale
15
15
  jsonapi_filter(page_scope_with_includes, allowed) do |filtered|
16
16
  # decorate with our page model that has a eager loaded elements collection
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
  module Alchemy
3
3
  module JsonApi
4
- VERSION = "0.22.0"
4
+ VERSION = "0.23.0"
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy-json_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.22.0
4
+ version: 0.23.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Meyerhoff
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-25 00:00:00.000000000 Z
11
+ date: 2021-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: alchemy_cms