acts_as_flying_saucer 0.0.5 → 0.0.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/README.markdown
CHANGED
@@ -34,7 +34,9 @@ It accepts the same options as ActionController::Base#render plus the following
|
|
34
34
|
|
35
35
|
:debug_html - (boolean expected) generates html output to the browser for debugging purposes
|
36
36
|
|
37
|
-
:clean It cleans up html using tidy (It uses tidy_ffi gem)
|
37
|
+
:clean - (boolean expected) It cleans up html using tidy (It uses tidy_ffi gem) default is false
|
38
|
+
|
39
|
+
:send_attachment - (boolean expected) If it is false it returns output pdf and attachment is not sent to client.
|
38
40
|
|
39
41
|
class FooController < ActionController::Base
|
40
42
|
acts_as_flying_saucer
|
@@ -87,15 +87,19 @@ module ActsAsFlyingSaucer
|
|
87
87
|
end
|
88
88
|
|
89
89
|
# sending the file to the client
|
90
|
-
|
90
|
+
if option[:send_attachment] == false
|
91
|
+
output_file
|
92
|
+
else
|
93
|
+
if options[:send_file]
|
91
94
|
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
95
|
+
send_file_options = {
|
96
|
+
:filename => File.basename(output_file)
|
97
|
+
#:x_sendfile => true,
|
98
|
+
}
|
99
|
+
send_file_options.merge!(options[:send_file]) if options.respond_to?(:merge)
|
100
|
+
send_file(output_file, send_file_options)
|
101
|
+
end
|
102
|
+
end
|
99
103
|
end
|
100
104
|
end
|
101
105
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: acts_as_flying_saucer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 6
|
10
|
+
version: 0.0.6
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Amar Daxini
|
@@ -15,7 +15,8 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-20 00:00:00 +05:30
|
19
|
+
default_executable:
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
22
|
name: nailgun
|
@@ -68,6 +69,7 @@ files:
|
|
68
69
|
- lib/acts_as_flying_saucer/java/src/encryptPdf.java
|
69
70
|
- lib/acts_as_flying_saucer/version.rb
|
70
71
|
- lib/acts_as_flying_saucer/xhtml2pdf.rb
|
72
|
+
has_rdoc: true
|
71
73
|
homepage: http://rubygems.org/gems/acts_as_flying_saucer
|
72
74
|
licenses: []
|
73
75
|
|
@@ -97,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
97
99
|
requirements: []
|
98
100
|
|
99
101
|
rubyforge_project: acts_as_flying_saucer
|
100
|
-
rubygems_version: 1.
|
102
|
+
rubygems_version: 1.4.2
|
101
103
|
signing_key:
|
102
104
|
specification_version: 3
|
103
105
|
summary: XHTML to PDF using Flying Saucer java library
|