ish_models 0.0.33.283 → 0.0.33.284
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_template.rb +5 -1
- data/lib/office/lead_action.rb +4 -1
- data/lib/office/lead_action_template.rb +8 -1
- 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: 4a4d957982b07fa1d853042019a04a184a7f29b72714c6cdf7a1004f280eb40f
|
4
|
+
data.tar.gz: 7e146b62cb7fc0f4a355a411ae4179da424df030c13a3c51c3290f4a7a5b829c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d17aebb57121789518229f7a1c2dbaf5779a7fe0ea9814cceb11f8a6d4434e0ec71564678a3b5f15c6d15870cb77b9301a2b23f6d7743507482da553a79ae96b
|
7
|
+
data.tar.gz: 9aeb3776194c1bbac334a18c493a14b85ed3eed5fa46c0456b6f7ecb6db063b7ef98ee3d8fb00bbbef69cd75f2007f804bc80bd5d365f3fc535139e475283f04
|
data/lib/ish/email_template.rb
CHANGED
@@ -5,7 +5,7 @@ class ::Ish::EmailTemplate
|
|
5
5
|
|
6
6
|
field :slug
|
7
7
|
validates_uniqueness_of :slug
|
8
|
-
validates_presence_of
|
8
|
+
validates_presence_of :slug
|
9
9
|
|
10
10
|
field :preview_str, type: :string
|
11
11
|
|
@@ -95,5 +95,9 @@ class ::Ish::EmailTemplate
|
|
95
95
|
end
|
96
96
|
def self.blank; self.blank_template; end
|
97
97
|
|
98
|
+
def to_s
|
99
|
+
"Tmpl:#{slug}"
|
100
|
+
end
|
101
|
+
|
98
102
|
end
|
99
103
|
::Tmpl = ::Ish::EmailTemplate
|
data/lib/office/lead_action.rb
CHANGED
@@ -7,6 +7,9 @@ class Office::LeadAction
|
|
7
7
|
include Mongoid::Timestamps
|
8
8
|
|
9
9
|
belongs_to :lead_action_template, class_name: '::Office::LeadActionTemplate', inverse_of: :lead_actions, foreign_key: :tmpl_id
|
10
|
+
def tmpl
|
11
|
+
lead_action_template
|
12
|
+
end
|
10
13
|
|
11
14
|
field :lead_id, type: :integer
|
12
15
|
validates :lead_id, presence: true
|
@@ -14,7 +17,7 @@ class Office::LeadAction
|
|
14
17
|
Lead.find( lead_id )
|
15
18
|
end
|
16
19
|
|
17
|
-
field :params, type: Object
|
20
|
+
field :params, type: Object, default: '{}'
|
18
21
|
|
19
22
|
|
20
23
|
end
|
@@ -20,6 +20,9 @@ class Office::LeadActionTemplate
|
|
20
20
|
KIND_UNSUBSCRIBE_CAMPAIGN = 'kind-unsubscribe-campaign'
|
21
21
|
KINDS = [ KIND_UNSUBSCRIBE_TEMPLATE, KIND_UNSUBSCRIBE_CAMPAIGN ]
|
22
22
|
|
23
|
+
def to_s
|
24
|
+
"OLAT:#{slug}"
|
25
|
+
end
|
23
26
|
|
24
27
|
def unsubscribe_from_campaign
|
25
28
|
end
|
@@ -35,6 +38,10 @@ class Office::LeadActionTemplate
|
|
35
38
|
})
|
36
39
|
end
|
37
40
|
|
41
|
+
def self.list
|
42
|
+
[ [nil,nil] ] + all.map { |i| [ i.slug, i.id.to_s ] }
|
43
|
+
end
|
44
|
+
|
38
45
|
|
39
46
|
end
|
40
|
-
|
47
|
+
OLAT = Office::LeadActionTemplate
|