wco_models 3.1.0.64 → 3.1.0.65

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: 8ce47664d92d06b21e041449c5aeb596b55bad9f380dfbf8e34361fd2d549bdb
4
- data.tar.gz: 80728ff93a9d6f89820ca2ef4257d8fa62244ebdc0a5fc872a0d28758100dc78
3
+ metadata.gz: 02fdc8bebae14b0be3eac4cb615b79dad76bc8744cb99562a186ada61d971e92
4
+ data.tar.gz: fb55583510689139a5a6b6edcb67cd6b329650d6fc0e3e64e1363fb442456e9f
5
5
  SHA512:
6
- metadata.gz: b2d62471c373c7d89933be5afeb0e406917cc61c690c19064184d93fe9bd9fa99a0acd58eaff09400e6a1fa9a85bf4803aa08f762cc50c9d52e24244bf29b333
7
- data.tar.gz: 4faf4a69f74c8b1b1487978b6b377dd6c2413261e818241d5a736d5d23e657fc82df95f97a125ada9e89a002f535d99a37157c65b31e5afb13886006f98cb0ba
6
+ metadata.gz: 5385f595a664d61d27ea8a99d13baa2af3fa7d7adab2c0cd77e80d24daaae35627e9893ce6ec93d1324fe9857a4a3d4287319d244f43cb71cddf88422cdac3a8
7
+ data.tar.gz: 45f1d42555b82d076e8e1a9c8d485bf96eef7ab05a3940eedebd1fc0a99d5a9a979640d329aeea81c1ee118472b29d40961d09715ab7a9c77b4bb2fdbd002291
@@ -58,18 +58,12 @@ class WcoEmail::ApplicationMailer < ActionMailer::Base
58
58
  'utm_source' => @ctx.tmpl.slug,
59
59
  }.map { |k, v| "#{k}=#{v}" }.join("&")
60
60
 
61
- # @origin = "https://#{Rails.application.config.action_mailer.default_url_options[:host]}"
62
-
63
61
  @unsubscribe_url = WcoEmail::Engine.routes.url_helpers.unsubscribes_url({
64
62
  template_id: @ctx.tmpl.id,
65
63
  lead_id: @lead.id,
66
64
  token: @lead.unsubscribe_token,
67
65
  host: Rails.application.routes.default_url_options[:host],
68
66
  })
69
- # renderer = Tmp6Ctl.new
70
- # renderer = IshManager::ApplicationController.new
71
- # renderer.send( :include, ::IshManager::ApplicationHelper )
72
- # renderer.send( :request, { host: 'test-host' } )
73
67
  renderer = WcoEmail::ApplicationMailer.new
74
68
 
75
69
  renderer.instance_variable_set( :@ctx, @ctx )
@@ -78,12 +72,10 @@ class WcoEmail::ApplicationMailer < ActionMailer::Base
78
72
  renderer.instance_variable_set( :@unsubscribe_url, @unsubscribe_url )
79
73
  renderer.instance_variable_set( :@tmpl_config, @tmpl_config )
80
74
 
81
- # eval( @ctx.tmpl.config_exe )
82
-
83
75
  rendered_str = renderer.render_to_string("/wco_email/email_templates/_#{@ctx.tmpl.layout}")
84
- @ctx.update({
76
+ @ctx.update!({
85
77
  rendered_str: rendered_str,
86
- sent_at: Time.now.to_s,
78
+ sent_at: Time.now.to_s,
87
79
  })
88
80
 
89
81
  mail( from: @ctx.from_email,
@@ -70,9 +70,8 @@ class WcoEmail::Context
70
70
  where( sent_at: nil, unsubscribed_at: nil )
71
71
  end
72
72
 
73
-
74
73
  def self.scheduled
75
- where( :send_at.lte => Time.now )
74
+ where( :send_at.gte => Time.now )
76
75
  end
77
76
 
78
77
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.64
4
+ version: 3.1.0.65
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-01-13 00:00:00.000000000 Z
11
+ date: 2024-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-s3