ish_models 0.0.33.231 → 0.0.33.232

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: 7779f5792082964493be63e188d2d488abfed178cdecb64b1f0e288643b6af60
4
+ data.tar.gz: 47b175252e94a3b59c947ebd09b363fc62178f37f29a837a3ed75d95a6233943
5
5
  SHA512:
6
- metadata.gz: 6ecc759ec798a3e34e7d422b601059012cf9291418fe049925fb86c9bd23cf2e1362f4278853173361608aacc54f201c41270ae4516988e81f0791de35a7b140
7
- data.tar.gz: f0b6519444a7eca6208dd5d31bdb266737a3223a7f57ba3643318d3285e02b074bd1334c08e076469df03f13c821ae9b40c1885602be51819650c15a79422b71
6
+ metadata.gz: 5dc4593e03760dea3a5ba96805ba7143c4c7fe6881a59b7e5498ebb1e1e3d00ddf09e6111d2103f703902bd38f7466710b1e24c8dbf7922cd5ff8c31c73332aa
7
+ data.tar.gz: 0c289c198d33ac678dfdc2ea3b5a4ec1d9fefb2f79ac69d123a02577b4c9d6bce4221578b097714e5d3ffb4981d6f5a3f1e503e6acae13b06d54bcb827589093
@@ -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
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.232
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox