ish_models 0.0.33.184 → 0.0.33.185
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/ish/email_context.rb +14 -3
- data/lib/ish/{lead.rb → trash/lead.rb} +0 -0
- data/lib/ish/{lead.rb-bk → trash/lead.rb-bk} +0 -0
- data/lib/ish_models.rb +0 -3
- metadata +3 -4
- data/lib/ish/issue.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85b9a6758d41c84ed2393951c0e8bd9733d92f745859689e64940677205962bf
|
4
|
+
data.tar.gz: 4133474740d173f9eddc0339a2c8fcc2b335a199db36f2f19cc813afe2889594
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4139e2903f034633a246aa43217b5f7eb64f3a5ec475774633d28b97984da2b35fa5ec4fde1ec4798b6c04f49c855db258df812f9dcb1e18e069326886d58031
|
7
|
+
data.tar.gz: 2ce2bed1e8a34efa83e643de5277561c3bc804503c5f6c293e72025ba639fc3b489eebd6d21296fe8d4598f1401bf9387d7fcfa21c686b30b3ed0e4c54a4d3c1
|
data/lib/ish/email_context.rb
CHANGED
@@ -8,6 +8,9 @@ class Ish::EmailContext
|
|
8
8
|
include Mongoid::Timestamps
|
9
9
|
|
10
10
|
field :title
|
11
|
+
def slug
|
12
|
+
title
|
13
|
+
end
|
11
14
|
|
12
15
|
PAGE_PARAM_NAME = 'email_contexts_page'
|
13
16
|
|
@@ -39,12 +42,20 @@ class Ish::EmailContext
|
|
39
42
|
field :sent_at, type: DateTime
|
40
43
|
field :scheduled_at, type: DateTime
|
41
44
|
|
42
|
-
def
|
45
|
+
def self.all_campaigns
|
46
|
+
Ish::EmailContext.where( type: TYPE_CAMPAIGN )
|
47
|
+
end
|
48
|
+
|
49
|
+
def campaign_leads
|
43
50
|
if self.type == TYPE_CAMPAIGN
|
44
|
-
return ::EmailCampaignLead.where( email_campaign_id: self.id.to_s ).includes( :lead )
|
51
|
+
return ::EmailCampaignLead.where( email_campaign_id: self.id.to_s ).includes( :lead )
|
45
52
|
end
|
46
53
|
end
|
47
54
|
|
55
|
+
def leads
|
56
|
+
campaign_leads&.map { |p| p.lead }
|
57
|
+
end
|
58
|
+
|
48
59
|
|
49
60
|
#
|
50
61
|
# For templating:
|
@@ -60,4 +71,4 @@ class Ish::EmailContext
|
|
60
71
|
attr_reader :tid
|
61
72
|
|
62
73
|
end
|
63
|
-
|
74
|
+
EmailCampaign = Ish::EmailContext
|
File without changes
|
File without changes
|
data/lib/ish_models.rb
CHANGED
@@ -44,7 +44,6 @@ require 'gameui/premium_purchase'
|
|
44
44
|
|
45
45
|
require 'ish/cache_key'
|
46
46
|
require 'ish/crawler'
|
47
|
-
# require 'ish/email_campaign' ## context + leadset is a campaign.
|
48
47
|
require 'ish/email_context'
|
49
48
|
require 'ish/email_template'
|
50
49
|
require 'ish/email_unsubscribe'
|
@@ -52,8 +51,6 @@ require 'ish/gallery_name'
|
|
52
51
|
require 'ish/image_asset'
|
53
52
|
require 'ish/input_error'
|
54
53
|
require 'ish/invoice'
|
55
|
-
require 'ish/issue'
|
56
|
-
require 'ish/lead'
|
57
54
|
require 'ish/lorem_ipsum'
|
58
55
|
require 'ish/meeting'
|
59
56
|
require 'ish/payment'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ish_models
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.33.
|
4
|
+
version: 0.0.33.185
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- piousbox
|
@@ -132,15 +132,14 @@ files:
|
|
132
132
|
- lib/ish/image_asset.rb
|
133
133
|
- lib/ish/input_error.rb
|
134
134
|
- lib/ish/invoice.rb
|
135
|
-
- lib/ish/issue.rb
|
136
|
-
- lib/ish/lead.rb
|
137
|
-
- lib/ish/lead.rb-bk
|
138
135
|
- lib/ish/lorem_ipsum.rb
|
139
136
|
- lib/ish/meeting.rb
|
140
137
|
- lib/ish/payment.rb
|
141
138
|
- lib/ish/premium_item.rb
|
142
139
|
- lib/ish/railtie.rb
|
143
140
|
- lib/ish/trash/email_campaign.rb
|
141
|
+
- lib/ish/trash/lead.rb
|
142
|
+
- lib/ish/trash/lead.rb-bk
|
144
143
|
- lib/ish/user_profile.rb
|
145
144
|
- lib/ish/utils.rb
|
146
145
|
- lib/ish_models.rb
|