locale_mailer 0.2.3 → 0.2.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 +4 -4
- data/lib/locale_mailer/concern.rb +4 -5
- data/lib/locale_mailer/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0189bbf06524259144c518b694d468179404bdbf
|
|
4
|
+
data.tar.gz: 8dff893af987c86414e8b8f440f5c09d4212299f
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 70ff16922cb1bee954f087f6655bd9b20e4f7afbc74f633e5ff606ed25694c63e1340c6cf1b35e118ca32bf20f1b03a8dec0158d54e1af96a0fbdda4697f259f
|
|
7
|
+
data.tar.gz: 25f125a438ba4916ce9da63443058109577008162ccdfbd05c44b9d935d1bd018498108137ecb04526ee3711d017fe3b421e01c2cba18e7d1793754bfaa01042
|
|
@@ -56,7 +56,7 @@ module LocaleMailer
|
|
|
56
56
|
].compact.join('.')
|
|
57
57
|
end
|
|
58
58
|
|
|
59
|
-
def action_i18n_options
|
|
59
|
+
def action_i18n_options options = {}
|
|
60
60
|
@action_i18n_options ||= instance_variables.inject({}) do |memo, name|
|
|
61
61
|
if name.to_s.match(/\A@(?!_).*/) and not name.to_s.match(/\A@action_i18n_/)
|
|
62
62
|
if instance_variable_get(name).try(:as_json).is_a? Hash
|
|
@@ -68,7 +68,7 @@ module LocaleMailer
|
|
|
68
68
|
end
|
|
69
69
|
end
|
|
70
70
|
memo
|
|
71
|
-
end
|
|
71
|
+
end.update(scope: action_i18n_path(options))
|
|
72
72
|
end
|
|
73
73
|
|
|
74
74
|
def flatten_hash(hash)
|
|
@@ -84,12 +84,11 @@ module LocaleMailer
|
|
|
84
84
|
end
|
|
85
85
|
|
|
86
86
|
def subject_from_locale options
|
|
87
|
-
view_context.t
|
|
87
|
+
view_context.t 'subject', action_i18n_options(options)
|
|
88
88
|
end
|
|
89
89
|
|
|
90
90
|
def body_from_locale options
|
|
91
|
-
render inline: view_context.text(
|
|
92
|
-
layout: options[:layout] || _layout
|
|
91
|
+
render inline: view_context.text('body', action_i18n_options(options)), layout: options[:layout] || _layout
|
|
93
92
|
end
|
|
94
93
|
|
|
95
94
|
end
|