ish_models 0.0.33.213 → 0.0.33.215
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 +10 -1
- data/lib/office/scheduled_email_action.rb +2 -0
- 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: 1d6497545f4ac626de4760e1cd371191c8cd8571e51e20b92aee2556754efadc
|
4
|
+
data.tar.gz: fca7ad785fd18654777cc153cd299d1e118320fedbcdfa0df8dc26b8976fa730
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4a3ad3f6f2f72a9bd50c6528288a94db0e0797609a33f7162ab556c330d9a93b15ab0c7aeb464a40368047769deb91b724575900db097e92bdf89bd3e361ff24
|
7
|
+
data.tar.gz: 47b59d873401c4bb4c5bbcdb7de3eaf5faa935cd9b0da29b8dc0e36f39dd6ecdf8601ef9fc2ec331c891a916dcd837787366e8cc3527f69864a5d41075a20e62
|
data/lib/ish/email_context.rb
CHANGED
@@ -18,6 +18,15 @@ class ::Ish::EmailContext
|
|
18
18
|
end
|
19
19
|
end
|
20
20
|
|
21
|
+
field :body
|
22
|
+
def body
|
23
|
+
if self[:body].presence
|
24
|
+
return self[:body]
|
25
|
+
else
|
26
|
+
return tmpl.body
|
27
|
+
end
|
28
|
+
end
|
29
|
+
|
21
30
|
PAGE_PARAM_NAME = 'email_contexts_page'
|
22
31
|
|
23
32
|
field :from_email
|
@@ -26,7 +35,7 @@ class ::Ish::EmailContext
|
|
26
35
|
field :subject
|
27
36
|
# validates_presence_of :subject
|
28
37
|
|
29
|
-
|
38
|
+
|
30
39
|
|
31
40
|
belongs_to :email_template
|
32
41
|
def tmpl; email_template; end
|
@@ -20,6 +20,8 @@ class Office::ScheduledEmailAction
|
|
20
20
|
|
21
21
|
belongs_to :email_action, class_name: '::Office::EmailAction'
|
22
22
|
def act; email_action; end
|
23
|
+
def act= a; email_action= a; end
|
24
|
+
validates :email_action, uniqueness: { scope: :lead_id }
|
23
25
|
|
24
26
|
has_many :email_contexts, class_name: '::Ish::EmailContext'
|
25
27
|
def ctxs; email_contexts; end
|