useful_renderers 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/useful_renderers/version.rb +1 -1
- data/lib/useful_renderers.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 63c4b461671436a8635c0dcb32cf225d0e348ce6
|
4
|
+
data.tar.gz: 8372d535dd0b4a04a083d2c7fc9cb326d436f039
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2c5d3fd4049896dc2309faf428467de4486dd9e8c190f71d16bab39a5bc7f5b6483d213f05357e3a3d3dbfdb8155b0d8f3c60b9e696c9fb63c251eee104c7981
|
7
|
+
data.tar.gz: 36bd0e1b55359baf50e907a6eba4f4d846c0c4d6edfad8360fa6e604e268181263014c473d4be760a8d77ee9c81a708ec7d3d015308ec3e42f31b199452ef42c
|
data/lib/useful_renderers.rb
CHANGED
@@ -14,7 +14,7 @@ module UsefulRenderers
|
|
14
14
|
send_data data, type: Mime::CSV, disposition: "attachment; filename=#{filename}.csv"
|
15
15
|
end
|
16
16
|
|
17
|
-
ActionController.add_renderer :
|
17
|
+
ActionController.add_renderer :zip do |csv, options|
|
18
18
|
filename = options[:filename] || options[:template]
|
19
19
|
csv.extend UsefulRenderers::ZipRenderable
|
20
20
|
data = csv.respond_to?(:to_zip) ? csv.to_csv(options) : csv
|