ish_models 0.0.33.214 → 0.0.33.217

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: 77575baa0cc8d37ffcf019adfc0953fe9710a1806292d3d0838bd8fd4639894f
4
- data.tar.gz: 9e23c48007b230e8c235dc10848f73354749fc301daa0946a706be63ddf64ae3
3
+ metadata.gz: 7a9e33aa3ea807dfc5e0930053ae7f242fa31af1abdc8404ed0a1669851506e6
4
+ data.tar.gz: 3aface0f98310b7ac3b036286f875b65811aa6e1a740f7f33291f69ad83c2a42
5
5
  SHA512:
6
- metadata.gz: 4fa4b33cd0ab4e36855bfb5306ab0ee4709fe2b612ca4348a9535034b42161ed93ec85d0fbff85b355a223647971c23cf32c1f51e3f0dd60fd0747b32cf5a7f4
7
- data.tar.gz: aecf017b63ef06fb6f21087250005c9fa1b83ea14152c551a6c84b274741b49591a2bcb4a471361cd3329c7b9193b692dfb07ba9eab18012e077c0e40fc900d2
6
+ metadata.gz: 2b12706b7183a889e56a71b616898f937b1423e3cba8e8c03fb69dcc7270ec4b0925507b304662ab14899f847fd460998bfe3329ef1e224d2dc3a78e3b406495
7
+ data.tar.gz: 375e5b35839e5602139e3e87bbedbf8b4c8154f536d53461a13266486ff8e70b64e7114f6c94bdf4a9d86db4a1e7925035ce539e47a28729aa27c16333518125
@@ -64,7 +64,7 @@ class ::Ish::EmailContext
64
64
 
65
65
  field :lead_id, type: :integer
66
66
  def lead; Lead.find( lead_id ); end
67
- def to_email; lead[:email]; end
67
+ def to_email; lead[:email]; end ## @TODO: remove, just use the lead. _vp_ 2023-03-27
68
68
 
69
69
 
70
70
  ##
@@ -113,7 +113,7 @@ class Ish::UserProfile
113
113
 
114
114
  profile = Ish::UserProfile.where( email: email ).first
115
115
  if profile
116
- puts! profile, "UserProfile#generate, already exists"
116
+ puts!( profile, "UserProfile#generate, already exists" ) if !Rails.env.test?
117
117
  return
118
118
  end
119
119
 
@@ -1,4 +1,6 @@
1
1
 
2
+ require 'action_view'
3
+
2
4
  ##
3
5
  ## When I receive one.
4
6
  ##
@@ -101,5 +103,12 @@ class Office::EmailMessage
101
103
  end
102
104
  end
103
105
 
106
+ def preview_str
107
+ body = part_html || part_html || 'Neither part_html nor part_txt!'
108
+ body = ::ActionView::Base.full_sanitizer.sanitize( body ).gsub(/\s+/, ' ')
109
+ body = body[0..200]
110
+ body
111
+ end
112
+
104
113
  end
105
114
  ::Msg = Office::EmailMessage
@@ -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
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.214
4
+ version: 0.0.33.217
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ">="
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rails
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - "~>"
116
+ - !ruby/object:Gem::Version
117
+ version: 6.1.0
118
+ type: :runtime
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - "~>"
123
+ - !ruby/object:Gem::Version
124
+ version: 6.1.0
111
125
  description: models of ish
112
126
  email: victor@wasya.co
113
127
  executables: []