effective_email_templates 1.1.4 → 1.2.1
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b1b5ced42deba88bc8a04fa40e1c5468ce63afcc1973b739e56567a42117e80
|
4
|
+
data.tar.gz: e9c50773c03d2786dd13ef629f39e2780b8637004f746132e21e16232d86e604
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecbb4090d883a34dac59d42e7e2ff48f3206c71f4db3dba146d7a6e6a999ca563961735fb6e8e05357e65eceaa6257e6ea57a2a017585bcec8d2d6e2c73a93c9
|
7
|
+
data.tar.gz: 9f34ecd94ffadbf2850fc23db24b353aa03fafab12745b6dd854d25b7d0a362e3305aa2adaf5a2e02cefe0ac8b4c33168250f74b0294d5c57645770a6f0eaa10
|
@@ -4,7 +4,9 @@ module EffectiveEmailTemplatesMailer
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
def mail(headers = {}, &block)
|
7
|
-
email_template = Effective::EmailTemplate.where(template_name: action_name).first
|
7
|
+
email_template = Effective::EmailTemplate.where(template_name: action_name).first
|
8
|
+
return super() if email_template.blank?
|
9
|
+
|
8
10
|
assigns = (@assigns || {})
|
9
11
|
|
10
12
|
# Parse assigns. Special keys for body and subject.
|
@@ -11,7 +11,12 @@ module EffectiveEmailTemplates
|
|
11
11
|
def execute(overwrite:, paths: nil, quiet: false)
|
12
12
|
return false unless ActiveRecord::Base.connection.table_exists?(EffectiveEmailTemplates.email_templates_table_name)
|
13
13
|
|
14
|
-
paths ||=
|
14
|
+
paths ||= if defined?(Tenant)
|
15
|
+
raise('expected a tenant') unless Tenant.current.present?
|
16
|
+
ActionController::Base.view_paths.reject { |view| view.path.include?('/apps/') }.map(&:path) + Tenant.view_paths.map(&:to_s)
|
17
|
+
else
|
18
|
+
ActionController::Base.view_paths.map(&:path)
|
19
|
+
end
|
15
20
|
|
16
21
|
paths.each do |path|
|
17
22
|
Dir[Rails.root.join(path, '**', '*_mailer/', '*.liquid')].each do |filepath|
|
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.1
|
4
|
+
version: 1.2.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:
|
11
|
+
date: 2023-01-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|