rails_email_preview 0.1.1 → 0.1.2

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: fc3115e421a24ec4e6b1a2938b30dfbbe606883a
4
- data.tar.gz: 83445266db534612bd1d8dbf85565c8b75cb882b
3
+ metadata.gz: 0f5773872c3d519a23d5f76153fe456ccab6ea14
4
+ data.tar.gz: dab9c099a7958f3e47066259296ad9b5cf560731
5
5
  SHA512:
6
- metadata.gz: 018be5b125c75e3fb0996592e9405f1592d07aca9e05ef8bb099980c0f76ec107dbe449a6f7f4d2c23832296153aa31801a0831ff1c6df419749c86f11f222ae
7
- data.tar.gz: a1844e61dcb13eb0f083a95dc8e9117744348ccf42876c4609506c7769a49dbf691a197bb196efca564433b54fbefdcfa133539a3aafaef106533b4c923923c5
6
+ metadata.gz: 0ce53a1f8274cd14de46c7eeb4e10248efcb35e57ce47e0bf6464f9e1d209e17417c63e11c2983757abc8e90a22918adc645e394765097a8dcefd099f2227b15
7
+ data.tar.gz: 9a742a012388f5553ce6f36abd487c1cf0909e724c43448b4b6f09395cf97f6a5848c8e83d7e3185526c9cca3acfde2085cdae5aacb81fcbc57bd11a94d6043f
@@ -17,8 +17,9 @@ module RailsEmailPreview
17
17
  def cms_email_subject(interpolation = {})
18
18
  snippet_id = "email-#{cms_email_id}"
19
19
  [I18n.locale, I18n.default_locale].compact.each do |locale|
20
- site = Cms::Site.find_by_locale(I18n.locale)
20
+ site = Cms::Site.find_by_locale(locale)
21
21
  snippet = site.snippets.find_by_identifier(snippet_id)
22
+ next unless snippet.try(:content).present?
22
23
 
23
24
  # interpolate even if keys/values are missing
24
25
  title = snippet.label.to_s
@@ -1,3 +1,3 @@
1
1
  module RailsEmailPreview
2
- VERSION = '0.1.1'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_email_preview
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy