forest_admin_rails 1.0.0.pre.beta.28 → 1.0.0.pre.beta.30

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: fc71209fe92dd800f2de518d2999262476af2563c1d3bcb013c51d01e9db8241
4
- data.tar.gz: 754c1b66cd8e8a129b70e2cd3c989164a33492d5a5b49dfe17aded1e144c236f
3
+ metadata.gz: d7c66b5faa3f932f6ec8d9953b02a7911691628792bf93c66a915d7bb2671a3c
4
+ data.tar.gz: ce858db5053d5de4d40423ebedebbe293abb199687ab69de0efc9422b0ec9bb6
5
5
  SHA512:
6
- metadata.gz: c561072c1d8d144579ab6734999b5c20f93f5f56efb77fb6c5a96570b0d6fe6a6c07218afe04da1372589088ce679a0294001a173347414b201cb93dbf7aeb7e
7
- data.tar.gz: c2a92b0fbad5b79e65f8ed6b8bb9c5d27c92aa2a639d30809b5063802d4551e31d9ea04274bc07ef77c3e9068364f43d4173b1619d77e10c9c624414dd41f31f
6
+ metadata.gz: da74b575e55867cf2c340c68c1d7f4265a34fb13b028b501d548e924da5d0c70af171d96c1a9e377efe4305fd46abbf1e2edcef82ead19b7ca2fd97f836f38f9
7
+ data.tar.gz: 660b05301465c7f108a7a81ee72b4745fedbb436f73db7905693caf8e3c807bc1a03a119ce2279b8ce72b8cc3ff7314875d3a1e8dcac6e8dbc50f94685770597
data/README.md CHANGED
@@ -25,4 +25,4 @@ $ gem install forest_admin
25
25
  Contribution directions go here.
26
26
 
27
27
  ## License
28
- The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
28
+ The gem is available as open source under the terms of the [GPL-3.0 License](https://www.gnu.org/licenses/gpl-3.0.en.html).
@@ -17,7 +17,15 @@ module ForestAdminRails
17
17
  end
18
18
 
19
19
  def forest_response(data = {})
20
- render json: data[:content], status: data[:status] || 200
20
+ if data.dig(:content, :type) == 'File'
21
+ return send_data data[:content][:stream], filename: data[:content][:name], type: data[:content][:mime_type],
22
+ disposition: 'attachment'
23
+ end
24
+
25
+ response.headers.merge!(data[:content][:headers] || {})
26
+ data[:content].delete(:headers)
27
+
28
+ render json: data[:content], head: headers, status: data[:status] || data[:content][:status] || 200
21
29
  end
22
30
 
23
31
  def exception_handler(exception)
@@ -1,3 +1,3 @@
1
1
  module ForestAdminRails
2
- VERSION = "1.0.0-beta.28"
2
+ VERSION = "1.0.0-beta.30"
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.28
4
+ version: 1.0.0.pre.beta.30
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-01-19 00:00:00.000000000 Z
12
+ date: 2024-02-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: dry-configurable
@@ -78,7 +78,7 @@ files:
78
78
  - lib/tasks/forest_admin_rails_tasks.rake
79
79
  homepage: https://www.forestadmin.com
80
80
  licenses:
81
- - MIT
81
+ - GPL-3.0
82
82
  metadata:
83
83
  homepage_uri: https://www.forestadmin.com
84
84
  source_code_uri: https://github.com/ForestAdmin/rails-forest_admin