jreport 0.0.12 → 0.0.13
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.
- checksums.yaml +4 -4
- data/README.md +9 -0
- data/lib/jreport/version.rb +1 -1
- data/skel/controllers/template.eruby +10 -0
- data/skel/views/template.eruby +2 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 370598e37e30c0275e93e840c43d4f19bd77d852
|
4
|
+
data.tar.gz: 43d5eb900d7b7746cec37def3e4441f9cd667de9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6940815d710b679b5bace487e5ab9e2c6c351be6a28de765cb9b8f7de21fc7f2c8192bda3c74dd9cd943217efa1d98b7872f7429517da3f5fbe0ef4ee65e203b
|
7
|
+
data.tar.gz: 15faf29597f06e7583af599dcfcd7fe85ecba2c0fde013d5d9decba20ecedabcc380f32fc7a38f4051dcc06d4e7a2396d485217d731229a8c60bed7f09699f41
|
data/README.md
CHANGED
@@ -157,6 +157,15 @@ Besides, you can access database directly in `irb`:
|
|
157
157
|
# or
|
158
158
|
mail.add_file :filename=>'somefile.png',:content=>'/path/to/f.png'
|
159
159
|
|
160
|
+
If you add a picture, and want to make it an embbeded picture,you can:
|
161
|
+
|
162
|
+
# First add it as attachemnt in controller
|
163
|
+
mail.add_file '/path/to/picture_name'
|
164
|
+
# Then in view
|
165
|
+
<img src="<%=attachments['picture_name'].url>"/>
|
166
|
+
# or if this is the only attachemnt
|
167
|
+
<img src="<%=attachments.first.url>"/>
|
168
|
+
|
160
169
|
3. Add cc
|
161
170
|
|
162
171
|
mail.cc="other@example.com"
|
data/lib/jreport/version.rb
CHANGED
@@ -4,6 +4,16 @@ class <%= controller.split('_').map{|x| x.capitalize }.join %>Controller
|
|
4
4
|
<% methods.each do |m| %>
|
5
5
|
def <%=m%>_report(mail)
|
6
6
|
# TODO: add code here
|
7
|
+
# mail.from='jason@example.com'
|
8
|
+
# mail.to='someone@example2.com'
|
9
|
+
# mail.subject="this is subject"
|
10
|
+
# mail.html_part=Mail::Part.new do
|
11
|
+
# content_type 'text/html;charset=UTF-8'
|
12
|
+
# end
|
13
|
+
# #add attachements
|
14
|
+
# mail.add_file '/path/to/attachment-file'
|
15
|
+
# #save html file
|
16
|
+
# self.save_to='/path/to/example.html'
|
7
17
|
end
|
8
18
|
<% end %>
|
9
19
|
end
|
data/skel/views/template.eruby
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jreport
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.13
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- qjpcpu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-08-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|