ish_models 0.0.33.231 → 0.0.33.233

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: f7a90237b3ffeec198b9d6732898d879fbc4b1958f66caa722bdb4902222f408
4
- data.tar.gz: 72ee5abe32d9966fb5a82d5bfc3c147a0ca20e5892a8c412eee838c1e8aefaf1
3
+ metadata.gz: 15ca1b54b0bc7435631e46a9a59f46827dfced47e491adac105d3dd67fed7663
4
+ data.tar.gz: 9b41c652d834af17efd2d36ed3f582352e0cdf445271dcde32c692820c12c4fd
5
5
  SHA512:
6
- metadata.gz: 6ecc759ec798a3e34e7d422b601059012cf9291418fe049925fb86c9bd23cf2e1362f4278853173361608aacc54f201c41270ae4516988e81f0791de35a7b140
7
- data.tar.gz: f0b6519444a7eca6208dd5d31bdb266737a3223a7f57ba3643318d3285e02b074bd1334c08e076469df03f13c821ae9b40c1885602be51819650c15a79422b71
6
+ metadata.gz: 3f4d47b3b918592d081f7219b85df89e57823018286db1ec22f7f976216ba2207a5495a18958d6a5fa6781464ff7acd5f0c1da117c450e4c5a2d6be76309c621
7
+ data.tar.gz: 343987b37ddc718162080702113a746f8a202f08136c5f228d9f3b9ae948cf8fce17b2c88be84e8731bb0146e61682210baac7c43c950aacf476b416419b49c7
@@ -7,30 +7,27 @@
7
7
  class Ish::EmailCampaign
8
8
  include Mongoid::Document
9
9
  include Mongoid::Timestamps
10
+ store_in collection: 'ish_email_campaigns'
10
11
 
11
- field :title
12
- def slug
13
- title
14
- end
12
+ field :slug
13
+ validates_uniqueness_of :slug, allow_nil: true
15
14
 
16
15
  PAGE_PARAM_NAME = 'email_contexts_page'
17
16
 
18
- FROM_EMAILS = %w| hello@infiniteshelter.com no-reply@infiniteshelter.com
19
- piousbox@gmail.com hello@piousbox.com no-reply@piousbox.com victor@piousbox.com
20
- admin@wasya.co hello@wasya.co no-reply@wasya.co victor@wasya.co |
17
+ FROM_EMAILS = %w| hello@infiniteshelter.com no-reply@infiniteshelter.com
18
+ piousbox@gmail.com hello@piousbox.com no-reply@piousbox.com victor@piousbox.com
19
+ admin@wasya.co hello@wasya.co no-reply@wasya.co victor@wasya.co |
21
20
  field :from_email
22
21
  validates_presence_of :from_email
23
22
  def self.from_email_list
24
23
  [ [nil, nil] ] + FROM_EMAILS.map { |i| [i, i] }
25
24
  end
26
25
 
27
- field :subject
28
- validates_presence_of :subject
26
+ belongs_to :email_template
27
+ def tmpl; email_template; end
29
28
 
29
+ field :subject
30
30
  field :body
31
- # validates_presence_of :body
32
-
33
- belongs_to :email_template
34
31
 
35
32
  field :sent_at, type: DateTime
36
33
  field :send_at, type: DateTime
@@ -43,6 +43,8 @@ class ::Ish::EmailContext
43
43
  belongs_to :scheduled_email_action, class_name: '::Office::ScheduledEmailAction', optional: true
44
44
  def sch; scheduled_email_action; end
45
45
 
46
+ belongs_to :email_campaign, class_name: 'Ish::EmailCampaign', optional: true
47
+
46
48
  field :rendered_str
47
49
 
48
50
  field :sent_at, type: DateTime
@@ -7,6 +7,7 @@ class Office::EmailFilter
7
7
  include Mongoid::Timestamps
8
8
 
9
9
  field :from_regex
10
+ field :subject_regex
10
11
  field :body_regex
11
12
 
12
13
  KIND_SKIP_INBOX = 'skip-inbox'
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.231
4
+ version: 0.0.33.233
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox