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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f5773872c3d519a23d5f76153fe456ccab6ea14
|
4
|
+
data.tar.gz: dab9c099a7958f3e47066259296ad9b5cf560731
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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(
|
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
|