jreport 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b59016c0d4c862999ad6b67af9cd40265d179728
4
- data.tar.gz: cc676ad5e1932c4faf00c49753f1cf3be04441b7
3
+ metadata.gz: 370598e37e30c0275e93e840c43d4f19bd77d852
4
+ data.tar.gz: 43d5eb900d7b7746cec37def3e4441f9cd667de9
5
5
  SHA512:
6
- metadata.gz: d9a2a12bec6ba0bef51eb166cecf2b21abaa652625712a7f5cc6bfd071e2da30b84a3c1b2cb017864dda869810a162e0a1b9a0bcaee81149306aea88e7fe2164
7
- data.tar.gz: dd3f20b9907107e534b44874b6ebfa01771c024f167ae1df1fc29f8fe443b559cec0c3d8dc132e95d8d1caf28cce9ee881db36c38c41f7bbe55785699eef3022
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"
@@ -1,3 +1,3 @@
1
1
  module Jreport
2
- VERSION = "0.0.12"
2
+ VERSION = "0.0.13"
3
3
  end
@@ -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
@@ -26,4 +26,6 @@
26
26
 
27
27
  </tbody>
28
28
  </table>
29
+ <!-- Insert image file from attachments -->
30
+ <img src="<%=attachments.first.url%>"/>
29
31
  <p>Created at:<%= Date.today.to_s %></p>
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.12
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-05-25 00:00:00.000000000 Z
11
+ date: 2014-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler