effective_email_templates 1.2.0 → 1.2.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
  SHA256:
3
- metadata.gz: 5a825ba548fb85d4457abfdbfb0275fbb2c587e48ab30e0e397b41ea9d2f42c3
4
- data.tar.gz: 7626c2168d86a547aa3a13e45f52c236eeb5e65c619b8a2c51bfb39f65d2fd3f
3
+ metadata.gz: da895a8ece071a2900adb08a102dc046359629b068144d28389c7127f6884d4b
4
+ data.tar.gz: 534912386dd99f2dc37110b19ba7ab93d54f4ba3bc19d69e09babdcb0ce77b56
5
5
  SHA512:
6
- metadata.gz: 29b61247525c81716517797802fb7a21f0bfd7176c76ba7f9302f6988fd3741c031aac688ba5104b5b7a41a45454ba067fc119e16f0a42166bac41310e88726d
7
- data.tar.gz: 671760817de5c14bb20712ef01925bf637301f3ff8dee6d5c93ef77b8e5fa85b245541c8e871af1216d182eba3c77d38bc85e39f29d9177aa9928a1767e2abe4
6
+ metadata.gz: '0215669e5b9b559277e81e6fd7950c50d928f1e93f9e8b1854288e127ed8a9519b33451429d77fb4a32e2d816aebbaaf6bd84c7bd5fffa265531a8a4230a6367'
7
+ data.tar.gz: 479bf7edd52f8d7a277a8ccf9f83965274046a6e318b85741fa9a5e6ae2995e2b80fd442c1cdfae74b5532ff846067c567ef78ee7ccf2d7e33004c789962b44f
@@ -12,7 +12,7 @@ module EffectiveEmailTemplates
12
12
 
13
13
  # Include has_one_email_review concern and allow any ActiveRecord object to call it
14
14
  initializer 'effective_email_templates.active_record' do |app|
15
- ActiveSupport.on_load :active_record do
15
+ app.config.to_prepare do
16
16
  ActiveRecord::Base.extend(HasOneEmailReview::Base)
17
17
  end
18
18
  end
@@ -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 ||= ActionController::Base.view_paths.map(&:path)
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|
@@ -1,3 +1,3 @@
1
1
  module EffectiveEmailTemplates
2
- VERSION = '1.2.0'.freeze
2
+ VERSION = '1.2.2'.freeze
3
3
  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.2.0
4
+ version: 1.2.2
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: 2022-10-25 00:00:00.000000000 Z
11
+ date: 2023-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails