to_spreadsheet 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
@@ -7,7 +7,7 @@ require 'action_controller/metal/responder'
|
|
7
7
|
ActionController::Renderers.add :xlsx do |template, options|
|
8
8
|
filename = options[:filename] || options[:template] || 'data'
|
9
9
|
data = ToSpreadsheet::Context.with_context ToSpreadsheet::Context.global.merge(ToSpreadsheet::Context.new) do |context|
|
10
|
-
html = render_to_string(template, options.merge(template: template, formats: ['html']))
|
10
|
+
html = render_to_string(template, options.merge(template: template.to_s, formats: ['html']))
|
11
11
|
ToSpreadsheet::Renderer.to_data(html, context)
|
12
12
|
end
|
13
13
|
send_data data, type: :xlsx, disposition: %(attachment; filename="#{filename}.xlsx")
|
metadata
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
name: to_spreadsheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 1.0.
|
5
|
+
version: 1.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Gleb Mazovetskiy
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-12-
|
12
|
+
date: 2012-12-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
version_requirements: !ruby/object:Gem::Requirement
|