forest_admin_rails 1.0.0.pre.beta.74 → 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: 92afe3eabf04ca0a3e8bfab53c45ac41078785a0113ccb0d4498dcad91daed1d
4
- data.tar.gz: 388682b30deabb8e406bb124ccc7adae02ab33fb2ec8743304663c5a90e28efe
3
+ metadata.gz: d13851f3ce574e470d69fdb36a9e1278baeeca8b7883d36d43d76e6c34f95f6e
4
+ data.tar.gz: a5f2ba117557c67f2993ef3656beca1fb22e925b1d3883b81ccbfaad4bcc9ed8
5
5
  SHA512:
6
- metadata.gz: 0ee7fea14b6c4dc022e314aafea629d33b09776ce11c6153d3249517fda2fc4e58b384504ccd469256999c08f8a8b60f5b77631b69665f8dbefba5e865be87d9
7
- data.tar.gz: 3b20c9b3e5300bc66826340295d1f118f0149248fce27207a2a8d788a0cf79b0ac1730d0dfb9db85e4bfc07498e9b978eb42490553a789c19da5b9bc82cb920f
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.74"
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.74
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