ish_models 0.0.33.243 → 0.0.33.245

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: 3cb9bfd0b2e4267bdafbdc6e0e07d9064dfcb7c5bcc4d767ccf14e12ee0f81fb
4
- data.tar.gz: b17871e045a9983e191457ad8ec843c03ce4cb515b0846ba1c5b23457a0ade34
3
+ metadata.gz: de7c1387a79b26351435ba9dd4e0820282f36e15464884b650e7f4cf489fd1f4
4
+ data.tar.gz: d36f19a818f22108ffb56d8f61f7e199816432b809d7c95d13466213342a9a4d
5
5
  SHA512:
6
- metadata.gz: f1c4d9279bc85b0c051a705e18bc0404a03880e04a69d0e73056e306f6aac13f789b8afebdb73dab6e3b5b8c6fd9fde0bf10dc4f33a5f9520784109500221ed6
7
- data.tar.gz: 45207a395aab807bdaf12b33b277e4d342267fdd5eb7ae00672e231cc93153671fc42e68fb284300068976d3f0b557cec4dd8502918a95dec76bf540c849e198
6
+ metadata.gz: ac941bc5a76b278489eb7d187154d8cbae27e04635a63b83c98c0d2e6c0b9c4adf01de26900e73f9ae50b38218aba00a70e29d9cb9dc434e4aafbf6dc4cae1a4
7
+ data.tar.gz: 8693c6a86dfe3e30de6b42a2a4cc3b27616a6f90b3082f80c72d646acdd98d993ed17084052e3a358a98f8d1509b8cc90564869ca72af8a731bc97d4cba6e062
@@ -36,7 +36,7 @@ class Ish::EmailCampaign
36
36
  end
37
37
 
38
38
  def leads
39
- campaign_leads&.map { |p| p.lead }
39
+ ::Lead.joins( :email_campaign_leads ).where( 'email_campaign_leads.email_campaign_id' => self.id.to_s )
40
40
  end
41
41
 
42
42
  ##
@@ -68,6 +68,7 @@ class ::Ish::EmailContext
68
68
  Ish::EmailCampaign.from_email_list
69
69
  end
70
70
 
71
+ ## like belongs_to to_lead , but Lead is SQL to just the lead_id
71
72
  field :lead_id, type: :integer
72
73
  def lead; Lead.find( lead_id ); end
73
74
  def to_email; lead[:email]; end ## @TODO: remove, just use the lead. _vp_ 2023-03-27
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.243
4
+ version: 0.0.33.245
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox