letter_bomb 0.0.3 → 0.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9991dbcaffe0d0867991bb6042a614092d9f3c87
4
- data.tar.gz: 6c98d12dd142a1d7e3d2957a3f76d4fcb223457e
3
+ metadata.gz: 9c0f20e0d9f778d0c449863699c644761d7834fe
4
+ data.tar.gz: dd6dfb942f14ca1e333101df21e897b60407ac6d
5
5
  SHA512:
6
- metadata.gz: c14a6965718ee08b188073aa169693b383638350bef15c49f0a5164548ce1b8ca69f9526d10aa15972291b2fa5fd24a4763b8823fa2cd725268a674ac4a7a00f
7
- data.tar.gz: 42fd06f8d046c24bdde371cc807949282c37b2de382d7bf86ba7a3aaac34826a61d11d014e7a3d864685edf1b23a38dfba9f91fdad2784395b682ffe73395a0f
6
+ metadata.gz: 6d80934dbdec296b6e4b155e4e6cd6ba22a193e1b47f27dde59db466532c03d8fc290caf872c8f47e914a1628bdb2d7d29698dbe807fa15086d989438995b21b
7
+ data.tar.gz: 5b489caf0a15aaa4bdd2793ae97d85ea99bd0f4de3fcef2f59b71c1dbd78356cdb90a2d753cd671e88aa83635795794855404ead90bb5d4f2a521a5f3e603041
@@ -10,16 +10,27 @@ module LetterBomb
10
10
  @action = params[:mailer_action]
11
11
  @mail = klass.constantize.preview_action(@action)
12
12
 
13
- params[:format] ||= @mail.multipart? ? "html" : "text"
13
+ params[:format] ||= content_type_html? ? "html" : "text"
14
14
 
15
15
  respond_to do |format|
16
- format.html
17
- format.text { render formats: [:html], content_type: 'text/html' }
16
+ format.html {
17
+ render layout: "letter_bomb/application"
18
+ }
19
+
20
+ format.text {
21
+ render layout: "letter_bomb/application",
22
+ formats: [:html],
23
+ content_type: 'text/html'
24
+ }
18
25
  end
19
26
  end
20
27
 
21
28
  private
22
29
 
30
+ def content_type_html?
31
+ @mail.content_type.match("text/html")
32
+ end
33
+
23
34
  def body_part
24
35
  return @mail unless @mail.multipart?
25
36
 
@@ -1,3 +1,3 @@
1
1
  module LetterBomb
2
- VERSION = '0.0.3'
2
+ VERSION = '0.0.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: letter_bomb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alex Smith