wco_models 3.1.0.318 → 3.1.0.320

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: 7202635871503e62282eec13d69be29b56bcbdfb5149bf0cde515f34492e5079
4
- data.tar.gz: 31c45480085600d8cbc51b3a2298300d0f805140ef2f3acff4fd488c70654e64
3
+ metadata.gz: 443a87c368a2129a7aab5d43f2838866af52ffb46f7363d262fbd0b0759cbb45
4
+ data.tar.gz: b807e5a65f5566bad7c9722c36733ae675d4e6905621a57641408bc35f2e812d
5
5
  SHA512:
6
- metadata.gz: ef4ba52532a00be8841afbc618166728cbf46dd5a3679d847c973888a2583308fa329633c5b7fbacbf4c60ffebfc35af6483d947d715f0bb3197d7518f2b6673
7
- data.tar.gz: 7ff2ed896dae044e58e45c458b9aff55574d2b4c796efb4ca89e205861dd03c78b92f3a8951308c3055f0e3364b8ed4a963f939f3be49859742f51f4813050e5
6
+ metadata.gz: 8547ddb2272dd81037c0e8c34b07d4327406ffcf05833f1eaa9bc1147604d881358f48b9796e2c7e3f5a3fd1826f24d4c5949d5c37807edd07d926c315440b18
7
+ data.tar.gz: 7eab25e6a504fb39aef9747bcc3ccb91fe7ab574af4fce1be8c506d1a46e1a409348531cc4837f184a416fca6e0036064d2d34d843112e5f64da11506bab139f
@@ -91,6 +91,7 @@ class Wco::Lead
91
91
  self[:unsubscribe_token]
92
92
  end
93
93
  field :unsubscribed_at
94
+ field :allow_unsubscribe, type: :boolean, default: true
94
95
 
95
96
  def to_s
96
97
  # "`#{name}` <#{email}>"
@@ -12,7 +12,7 @@ class WcoEmail::EmailAction
12
12
 
13
13
 
14
14
  STATUS_ACTIVE = 'active'
15
- STATUS_INACTIVE = 'inactive'
15
+ STATUS_INACTIVE = 'disabled'
16
16
  STATUS_TRASH = 'trash'
17
17
  STATUS_UNSUBSCRIBED = 'unsubscribed'
18
18
  STATUSES = [ nil, STATUS_ACTIVE, STATUS_INACTIVE, STATUS_UNSUBSCRIBED, STATUS_TRASH ]
@@ -127,7 +127,7 @@ class WcoEmail::Message
127
127
  oa = Wco::OfficeAction.where({
128
128
  office_action_template: aject,
129
129
  lead: message.lead }).first
130
- oa.update_attributes!({ status: 'inactive' })
130
+ oa.update_attributes!({ status: 'disabled' })
131
131
 
132
132
  end
133
133
  end
@@ -14,6 +14,10 @@
14
14
  .field
15
15
  %label unsubscribed_at
16
16
  = f.text_field :unsubscribed_at
17
+ .field
18
+ %label allow_unsubscribe
19
+ = f.check_box :allow_unsubscribe
20
+
17
21
 
18
22
  .field
19
23
  = f.label :phone
@@ -19,7 +19,8 @@
19
19
  %hr
20
20
  = raw @ctx.reply_to_message.part_html_sanitized
21
21
 
22
- %br
23
- = link_to 'unsubscribe', wco.unsubscribe_by_token_url( token: @ctx.lead.unsubscribe_token, email: @ctx.lead.email ), style: "color: #999;"
24
- %br
25
- .div{ style: "color: #999;" } WasyaCo 201 W 5th St 11th Floor, Austin, TX 78701
22
+ - if @ctx.lead.allow_unsubscribe
23
+ %br
24
+ = link_to 'unsubscribe', wco.unsubscribe_by_token_url( token: @ctx.lead.unsubscribe_token, email: @ctx.lead.email ), style: "color: #999;"
25
+ %br
26
+ .div{ style: "color: #999;" } WasyaCo 201 W 5th St 11th Floor, Austin, TX 78701
data/lib/wco_models.rb CHANGED
@@ -26,7 +26,7 @@ require 'stripe'
26
26
  require "wco/engine"
27
27
 
28
28
  ACTIVE = 'active'
29
- INACTIVE = 'inactive'
29
+ INACTIVE = 'disabled'
30
30
  STATUSES = [ nil, ACTIVE, INACTIVE ]
31
31
 
32
32
  module Iro; end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wco_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.318
4
+ version: 3.1.0.320
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Pudeyev