forest_admin_rails 1.0.0.pre.beta.75 → 1.0.0.pre.beta.77

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: 5a7bb44b784c5ef05f46c2528e88d0f1600ee6b8004fa83e3e104191f3d6df9d
4
+ data.tar.gz: a07ae4bc9d6a631b11103a58183685ffda87888ffd501d1f9c92f0904d08b598
5
5
  SHA512:
6
- metadata.gz: b16365506926eac2fd557e300d24ca11f90205e8bae066c75e03759d2b5e6b3c6214034e58575f12cf434519826a14287a578a2a939fc33222b4c9ecff8353c5
7
- data.tar.gz: 210579066bde557b1687cc95cb6676d925e3aa81f744c65b700b9ffd584da38ef1d29ec78842b9474fc918fcc9ab2272242eef2988895a18d10d2dcbbf8479b5
6
+ metadata.gz: 1d62c5dfca5d61b91414c6c715f8cbffa8adc8a8a23405b44b8280b8416dfe002460af6d08903158bb312a7a580376c64b5234fbd0ffe05fa38578fe92c629be
7
+ data.tar.gz: 6ec18e65af62e0f6b7cb4f76c5a6368a56ae709a7722d39f9b7e194269b93544a78c8b2a04fa538b381eb04ffcf386d92a551860fe78f8fdb4e3fa63b65f7455
@@ -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.77"
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.77
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