ish_models 0.0.33.185 → 0.0.33.186
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 +12 -4
- data/lib/ish/user_profile.rb +0 -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: d027fcc8d0c98d5575e517250768051102853dc5615027fe2c9179d040c77d6f
|
4
|
+
data.tar.gz: b4de385ed7e98ba1903726b618d5de6ce5c4c0f032f8d0364ae3b306790f36f9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 202b110ebedc34cc0ae916459fe309f6641674d92c3230585f0d1d68fdeb2aa490820c8be1537f872811c87bd74ea47d1a3a089cede0bc2b1d634a397a22f743
|
7
|
+
data.tar.gz: afc8efc356d678c9f5bce359bca29327df0070a4969a920168cdc1f348c39c5e8fbec35f99758005b88e4bc8835d53b1a881cc7d7f9c00c556d9d62bfc180b0c
|
data/lib/ish/email_context.rb
CHANGED
@@ -57,10 +57,18 @@ class Ish::EmailContext
|
|
57
57
|
end
|
58
58
|
|
59
59
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
60
|
+
##
|
61
|
+
## For templating:
|
62
|
+
##
|
63
|
+
## commonly: name, companyName
|
64
|
+
field :tmpl, type: Hash, default: {}
|
65
|
+
def body_templated
|
66
|
+
out = email_template.body
|
67
|
+
tmpl.each do |k, v|
|
68
|
+
out.gsub!("{#{k}}", v)
|
69
|
+
end
|
70
|
+
out
|
71
|
+
end
|
64
72
|
|
65
73
|
field :to_email
|
66
74
|
validates_presence_of :to_email, if: -> { type == TYPE_SINGLE }
|
data/lib/ish/user_profile.rb
CHANGED
@@ -54,7 +54,6 @@ class Ish::UserProfile
|
|
54
54
|
has_many :my_maps, :inverse_of => :creator_profile, class_name: 'Gameui::Map'
|
55
55
|
|
56
56
|
has_many :invoices, :class_name => '::Ish::Invoice'
|
57
|
-
has_many :leads, :class_name => '::Ish::Lead'
|
58
57
|
has_many :photos
|
59
58
|
has_many :reports, inverse_of: :user_profile
|
60
59
|
|