promethee 4.1.24 → 4.1.25

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: 7145e518ad25c8a3cefdc62c8e88ffc18d38ef26fac581eb68d81b787ab068cd
4
- data.tar.gz: d991b878c6e586222e604e2e6274a2eeec9a4a3841cc8c1be97ce9a1ce48e210
3
+ metadata.gz: b5b3c7e537b1443c1ec974382985194710e21bf9b385b8f7f4194298fe9f57fb
4
+ data.tar.gz: ce6ccd967d3259aef3331fa1e112ec87b9c533cfec8fac8254388427d552d26b
5
5
  SHA512:
6
- metadata.gz: e5a2cdf6c4845ea3ece5af7af3f3cb429dc8a1e83816e01890e8e931a10cae97af449d82af71613d6835a5032ebf0fcb284878920a9433de822b8c6c604ca531
7
- data.tar.gz: 708ef23624ae3876d3c470991e49eba30aa98cb1e906f20a5b280cb27cd650923e03378d9fbf486a2adb5b21ab7b66b7d5c6b16a380466f83eee587553418e4d
6
+ metadata.gz: 671e7a03beb11f59003c8798822f5e80ebef4407f7f0c797f96e53b5f603111ba79b398c2082455ed1cefabc31c691360a024a0133dbf977b6048358208a546f
7
+ data.tar.gz: e7e566247e22cff58ac2954475f1809a8a1d76dfcabd4813363a2904d69082cda4ad3f86dd8f0e5ccc539a33a5c7ec8375aa3c35a25a7a3787a18e89414c7124
@@ -18,7 +18,8 @@ class PrometheeController < ApplicationController
18
18
  def blob_show
19
19
  # as this is called only from promethee preview it sends an image resized to 720
20
20
  begin
21
- blob = ActiveStorage::Blob.find_signed(params[:id])
21
+ blob_find_method = ActiveStorage::Blob.respond_to?(:find_signed!) ? :find_signed! : :find_signed
22
+ blob = ActiveStorage::Blob.public_send(blob_find_method, params[:id])
22
23
  rescue
23
24
  raise ActiveRecord::RecordNotFound
24
25
  end
@@ -37,7 +37,8 @@ module PrometheeData
37
37
  end
38
38
 
39
39
  def promethee_data_page_thumbnail
40
- ActiveStorage::Blob.find_signed(data['attributes']['thumbnail']['value']['id'])
40
+ blob_find_method = ActiveStorage::Blob.respond_to?(:find_signed!) ? :find_signed! : :find_signed
41
+ ActiveStorage::Blob.public_send blob_find_method, data['attributes']['thumbnail']['value']['id']
41
42
  rescue
42
43
  nil
43
44
  end
@@ -48,7 +48,10 @@ module Promethee::Rails::Helper
48
48
 
49
49
  def blob_from_data(blob_data = {})
50
50
  return unless blob_data&.has_key? :id
51
- ActiveStorage::Blob.find_signed(blob_data[:id]) rescue nil
51
+ blob_find_method = ActiveStorage::Blob.respond_to?(:find_signed!) ? :find_signed! : :find_signed
52
+ ActiveStorage::Blob.public_send blob_find_method, blob_data[:id]
53
+ rescue
54
+ nil
52
55
  end
53
56
 
54
57
  # promethee_bem_classes 'promethee-edit__move__droppable', '--{{type}}', '--first'
@@ -1,5 +1,5 @@
1
1
  module Promethee
2
2
  module Rails
3
- VERSION = '4.1.24'
3
+ VERSION = '4.1.25'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: promethee
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.24
4
+ version: 4.1.25
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Gaya
@@ -14,7 +14,7 @@ authors:
14
14
  autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
- date: 2021-01-05 00:00:00.000000000 Z
17
+ date: 2021-01-06 00:00:00.000000000 Z
18
18
  dependencies:
19
19
  - !ruby/object:Gem::Dependency
20
20
  name: rails