effective_email_templates 1.4.0 → 1.4.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f6f761daef6975677ea045c02bec4fe35c12613428d7a471ea96090d9ff4f8ee
|
4
|
+
data.tar.gz: 643bb762e01e5f086d90fe91465dc150033f27e2cd913f3295b02c1d35e0cff0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d516cd29cdbf67641658d726e3d6ac3c670d25f1a563827516e05f8bb78aeb31c316f3270c4cdf981d74cd5d0efb8f980bb4035b6bdca61738000f4a344b7d20
|
7
|
+
data.tar.gz: 1e10e8b93b994cbbb3a8b715a97d039648655cd2f307fbbdf5cf3caafae73fd4c735ead6a8461e9e5c209a00ddb5dc4dc9d773919192d92a29d1b5a1d3cfe8d1
|
@@ -18,7 +18,7 @@ module EffectiveEmailTemplatesMailer
|
|
18
18
|
email_template.subject = subject if subject.present?
|
19
19
|
|
20
20
|
# Add any _url helpers
|
21
|
-
assigns = route_url_assigns(email_template).merge(assigns)
|
21
|
+
assigns = route_url_assigns(email_template, assigns).merge(assigns)
|
22
22
|
|
23
23
|
# Render from the template, possibly with updated body
|
24
24
|
rendered = email_template.render(assigns)
|
@@ -28,8 +28,12 @@ module EffectiveEmailTemplatesMailer
|
|
28
28
|
|
29
29
|
private
|
30
30
|
|
31
|
-
def route_url_assigns(email_template)
|
32
|
-
email_template.template_variables
|
31
|
+
def route_url_assigns(email_template, existing)
|
32
|
+
route_variables = email_template.template_variables
|
33
|
+
.select { |name| name.ends_with?('_url') }
|
34
|
+
.reject { |name| existing.key?(name) || existing.key?(name.to_sym) }
|
35
|
+
|
36
|
+
route_variables.inject({}) do |h, name|
|
33
37
|
h[name] = public_send(name) if respond_to?(name); h
|
34
38
|
end
|
35
39
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_email_templates
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|