ish_models 0.0.33.186 → 0.0.33.188
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 +6 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5be06df7dd4e5ef757b2b41322b1dcb072a7e2e772aa62384b368d27d3e0e483
|
4
|
+
data.tar.gz: 74b8d54e887100fd29150d9aa841d82bc851e2b9520704e9cacf5430fd381cd8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3cec2a4ac7f740f1ab7919962f2bd82ed6c185e676ec68befb66b811befd6e3b1f058772c714e993ad9deb85edc7e20ccfcab4769de511ac477fda7c657e88f1
|
7
|
+
data.tar.gz: 792de38c42ca34ea13064540a39044fa05d994119840d1352ed2d50a7728d72c0c9a2101c73d1446bc5ccc31022b830b39887b7c2c76e01f393708a8097faa6b
|
data/lib/ish/email_context.rb
CHANGED
@@ -14,7 +14,8 @@ class Ish::EmailContext
|
|
14
14
|
|
15
15
|
PAGE_PARAM_NAME = 'email_contexts_page'
|
16
16
|
|
17
|
-
FROM_EMAILS = %w| piousbox@gmail.com victor@piousbox.com
|
17
|
+
FROM_EMAILS = %w| piousbox@gmail.com victor@piousbox.com no-reply@piousbox.com
|
18
|
+
admin@wasya.co hello@wasya.co no-reply@wasya.co victor@wasya.co |
|
18
19
|
field :from_email
|
19
20
|
validates_presence_of :from_email
|
20
21
|
def self.from_email_list
|
@@ -46,6 +47,10 @@ class Ish::EmailContext
|
|
46
47
|
Ish::EmailContext.where( type: TYPE_CAMPAIGN )
|
47
48
|
end
|
48
49
|
|
50
|
+
def self.unsent_campaigns
|
51
|
+
Ish::EmailContext.where( type: TYPE_CAMPAIGN, sent_at: nil )
|
52
|
+
end
|
53
|
+
|
49
54
|
def campaign_leads
|
50
55
|
if self.type == TYPE_CAMPAIGN
|
51
56
|
return ::EmailCampaignLead.where( email_campaign_id: self.id.to_s ).includes( :lead )
|