ish_models 0.0.33.189 → 0.0.33.191

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/ish/email_context.rb +16 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a1023968a15efc301afba5ecb507ded57de284473825d9a9523e4bc80ea50c7e
4
- data.tar.gz: ede37e6b2db3a0cf41b0ba0c49b60ce8da8133238459d7282ad20a935a05b610
3
+ metadata.gz: 0d6a32875f72d683db8e0ceb5fe80d8e4ec97763069cd9b440d6dbf596186dfb
4
+ data.tar.gz: c12b5d7614616ee9138a6349e330d76dd8856129c13836deca7cb40a06594ace
5
5
  SHA512:
6
- metadata.gz: 9dcd0956c974ece701d035a8e37a685c42063656ebc590290c0f5df3ad7c4a23acd8aca88b5c6160f73549a62ec88ef48bceab42e49353f22a014b12fc5ee153
7
- data.tar.gz: c1fc8726fd1d7d20926c87693ec4badfb15e5689cb9a7a20df1279dcafaaca502a2015538ef8c9ce5a0e098c5921eb61722429560d257b9d6250f6a0390f9a35
6
+ metadata.gz: 217723c9b7e8e728eec1faa918d79bca3134ccf3cd4a9115f0182f32dabcd5474c5ded002605999e99b8c5692452b911af6ad581dad8ddbc14a441bbc0521dda
7
+ data.tar.gz: 5b79b4986bb4e3ab4be66350a6d3cf511fd395c5ea06d8266b3ced8114e42181856eb8a2452b646aa673cc2ceb187bdc81f5144d94d6d9b25fb77508e648c395
@@ -41,7 +41,7 @@ class Ish::EmailContext
41
41
  field :rendered_str
42
42
 
43
43
  field :sent_at, type: DateTime
44
- field :scheduled_at, type: DateTime
44
+ field :send_at, type: DateTime
45
45
 
46
46
  def self.all_campaigns
47
47
  Ish::EmailContext.where( type: TYPE_CAMPAIGN )
@@ -61,6 +61,21 @@ class Ish::EmailContext
61
61
  campaign_leads&.map { |p| p.lead }
62
62
  end
63
63
 
64
+ def self.unsent
65
+ new.unsent
66
+ end
67
+ def unsent
68
+ Ish::EmailContext.where( sent_at: nil )
69
+ end
70
+
71
+ def self.current
72
+ new.current
73
+ end
74
+ def current
75
+ # or({ :send_at.lte => Time.now }, { :send_at => nil }) ## This won't work b/c I need draft state!
76
+ Ish::EmailContext.where({ :send_at.lte => Time.now })
77
+ end
78
+
64
79
 
65
80
  ##
66
81
  ## For templating:
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.189
4
+ version: 0.0.33.191
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox