ish_models 0.0.33.181 → 0.0.33.182

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35c779eec7fc64840dfadc7ca7d585f6c4a583295e85c278580b53c3c0c0775a
4
- data.tar.gz: 86dc21c7dca66c81652521a0d4ff86ab110bdbe819351835763f2bd40cdc320c
3
+ metadata.gz: 2955b69e5c3cb7c88715600adfc9a661d18bc5a244a91d39f16528152d0bbcc5
4
+ data.tar.gz: 898ce52f6c280db8503702374b64a34f7ecb20b8bcce9dc2d333e468e7577013
5
5
  SHA512:
6
- metadata.gz: be8bc0b1e9e652f25308acb2c6c90ab0703e310bab8e51ad2f86404897444c6502d2910d1a5eae7862e5c6147a6716af1987f53cffcb0736b8f2974e9dde10db
7
- data.tar.gz: a1bd576a1ef3d754f3216c0c6de25199872171783932ee8ad1628475dc1688f28c236ef86c078227ca7040ae42141622f028f1aecb8317726274b1c4d9370a91
6
+ metadata.gz: 6e3b705030a52fe4a626fc8c666de6b578ae04dc01ae0a5abb44d505fe48be96e567d197848be5462ce291ed6f6419a32ba8d78dae5d5e05d55a2ec42bd400df
7
+ data.tar.gz: f3f899139297bd7e575a36562014f43df35791b8d0829c2830a19fc2e706adcf09f9c23925b57efafdbe71a59efd408039dcbc9f91bfba3309fcadfd478ccf87
@@ -9,6 +9,13 @@ class Ish::EmailContext
9
9
 
10
10
  PAGE_PARAM_NAME = 'email_contexts_page'
11
11
 
12
+ FROM_EMAILS = %w| piousbox@gmail.com victor@piousbox.com victor@wasya.co no-reply@piousbox.com |
13
+ field :from_email
14
+ validates_presence_of :from_email
15
+ def self.from_email_list
16
+ [ [nil, nil] ] + FROM_EMAILS.map { |i| [i, i] }
17
+ end
18
+
12
19
  field :to_email
13
20
  validates_presence_of :to_email
14
21
 
@@ -16,7 +23,7 @@ class Ish::EmailContext
16
23
  validates_presence_of :subject
17
24
 
18
25
  field :body
19
- validates_presence_of :body
26
+ # validates_presence_of :body ## With plain type, there is no body but there are variables for templating.
20
27
 
21
28
  belongs_to :email_template
22
29
 
@@ -24,5 +31,10 @@ class Ish::EmailContext
24
31
 
25
32
  field :sent_at, type: DateTime
26
33
 
34
+ #
35
+ # For templating:
36
+ #
37
+ field :name
38
+
27
39
  end
28
40
  EmailContext = Ish::EmailContext
@@ -9,5 +9,15 @@ class ::Ish::EmailTemplate
9
9
 
10
10
  field :version, default: '0.0.0'
11
11
 
12
+ TYPES = %w| partial plain |
13
+ field :type
14
+ def self.type_list
15
+ [ [nil,nil] ] + TYPES.map { |i| [i, i] }
16
+ end
17
+
18
+ field :subject
19
+ field :body
20
+ field :from_email
21
+
12
22
  end
13
23
  EmailTemplate = ::Ish::EmailTemplate
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.181
4
+ version: 0.0.33.182
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox