forest_admin_rails 1.0.0.pre.beta.29 → 1.0.0.pre.beta.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/app/controllers/forest_admin_rails/forest_controller.rb +9 -1
- data/lib/forest_admin_rails/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c48fb16e553146dbc82c41b491fab5943947f100ded57ae4d6285e933da09b0
|
4
|
+
data.tar.gz: 4431cacb0a248419c202774ff37a6fbfe5379639618e1bbf4e415134de88a6d9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f6332865cd4a8be2c8a3c7639cb7c4224803c133178c510737a8e1072577f759c8f878ae3939aa393470a059e9b48d6bc67e49b7b1f9c1fdc1aba12ab37154a
|
7
|
+
data.tar.gz: 621e36ed19192f8bcdab536b30c650494cfad76efbad760e7e4ecf23c63cab94425a6886ad47dc3ba5bcf9e04ae726a627dd96e60ab96f37192b33ce0c92ca83
|
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 [
|
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
|
-
|
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)
|
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.
|
4
|
+
version: 1.0.0.pre.beta.31
|
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-
|
12
|
+
date: 2024-02-22 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
|
-
-
|
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
|