jpie 3.0.1 → 3.0.3

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: 76f0eb703c1ef1efcee33914f27a294992104020cdd8e77fd67490bd3b2ef78f
4
- data.tar.gz: 92fd853966971901b0c6774a8a71032887e7458a697df07c7ef9b12cd7d52bd7
3
+ metadata.gz: 74099168434a717c88d4fc6ade7c97b6aa049f31fc597cd0db76e2d816a693a7
4
+ data.tar.gz: 70a2b20227fb36989590b8fd35e9bb4a27b6776569373eea9e6a7c2bf53da606
5
5
  SHA512:
6
- metadata.gz: 1884a7af5d611aefe784079308484d301bfb1bdc33f487460833d537c03826426dcc26ec6e6181134263578acc936466ec4ffe812dbe84e708d40f4f6381c136
7
- data.tar.gz: a86f4270780912555d482bd808850be5bb869b3fc2451fcd02148bede3901e2b1d3e447cec8eb934a1e0f40327a343339bf2a4ebeb774fc0308018e0c4deb0be
6
+ metadata.gz: f2cd53a342faa153971456b1a5024bb2c61b39d6f0e43345e058993c1c7c8a6f8d71b58726f28786ec6230548c2e232b30c64c06f5aae0323ae58c0b27ac7284
7
+ data.tar.gz: 35619211ebc1a5455ee003702943b078eba8c3f94a0d11e50a284ae9eab9e9f35da0ca7e5fc464a4cb3923c7ad83075923d36c4b8c2dc86c217bed20f4c6790d
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jpie (2.1.5)
4
+ jpie (3.0.2)
5
5
  actionpack (~> 8.1, >= 8.1.0)
6
6
  pg_query (>= 4)
7
7
  prosopite (>= 1)
@@ -35,6 +35,7 @@ module JSONAPI
35
35
  end
36
36
 
37
37
  def index
38
+ authorize_resource_action!(@resource_class.model_class, action: :index)
38
39
  scope = apply_authorization_scope(@resource_class.records, action: :index)
39
40
  query = build_query(scope)
40
41
  @total_count = query.total_count
@@ -39,7 +39,7 @@ module JSONAPI
39
39
  end
40
40
 
41
41
  def image_blob_with_parent?
42
- parent_record && association_name && record.content_type&.start_with?("image/")
42
+ parent_record && association_name && record.representable? && record.content_type&.start_with?("image/")
43
43
  end
44
44
 
45
45
  def variant_options_for_parent_association
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JSONAPI
4
- VERSION = "3.0.1"
4
+ VERSION = "3.0.3"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jpie
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Emil Kampp