forest_admin_rails 1.0.0.pre.beta.75 → 1.0.0.pre.beta.76

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: 853154f1c851839bed808e2e48919a77b435f37fd8c783768c1bcb80e0d0e65a
4
- data.tar.gz: fa0b0d4c9bc77cd14d1654e8c14dc443de360ce2c5d6b701c5ea4022e59b69db
3
+ metadata.gz: d13851f3ce574e470d69fdb36a9e1278baeeca8b7883d36d43d76e6c34f95f6e
4
+ data.tar.gz: a5f2ba117557c67f2993ef3656beca1fb22e925b1d3883b81ccbfaad4bcc9ed8
5
5
  SHA512:
6
- metadata.gz: b16365506926eac2fd557e300d24ca11f90205e8bae066c75e03759d2b5e6b3c6214034e58575f12cf434519826a14287a578a2a939fc33222b4c9ecff8353c5
7
- data.tar.gz: 210579066bde557b1687cc95cb6676d925e3aa81f744c65b700b9ffd584da38ef1d29ec78842b9474fc918fcc9ab2272242eef2988895a18d10d2dcbbf8479b5
6
+ metadata.gz: 372cf71064e226b6f77afa17287bf7286342f9d5b20381df1ed956d32ed34f0d767ca7fd189b8e944d666d2fa5c4e635403ca3f3ffe048eb233844c46d8c0f8e
7
+ data.tar.gz: ea84ea78f56a8520b857c0d3bb91154483ca159d29db0be3bcb3896af907ea82be205af81a9c4e18674d95ddf30fb178a5c92821c4b1239fe7f749ce88972510
@@ -19,14 +19,16 @@ module ForestAdminRails
19
19
  end
20
20
 
21
21
  def forest_response(data = {})
22
- if data.dig(:content, :type) == 'File'
23
- return send_data data[:content][:stream], filename: data[:content][:name], type: data[:content][:mime_type],
24
- disposition: 'attachment'
25
- end
22
+ if data[:content].is_a?(Hash)
23
+ if data.dig(:content, :type) == 'File'
24
+ return send_data data[:content][:stream], filename: data[:content][:name], type: data[:content][:mime_type],
25
+ disposition: 'attachment'
26
+ end
26
27
 
27
- if data.dig(:content, :headers)
28
- response.headers.merge!(data[:content][:headers] || {})
29
- data[:content].delete(:headers)
28
+ if data.dig(:content, :headers)
29
+ response.headers.merge!(data[:content][:headers] || {})
30
+ data[:content].delete(:headers)
31
+ end
30
32
  end
31
33
 
32
34
  respond_to do |format|
@@ -1,3 +1,3 @@
1
1
  module ForestAdminRails
2
- VERSION = "1.0.0-beta.75"
2
+ VERSION = "1.0.0-beta.76"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: forest_admin_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.pre.beta.75
4
+ version: 1.0.0.pre.beta.76
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2024-10-10 00:00:00.000000000 Z
12
+ date: 2024-10-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-configurable