ish_models 0.0.33.283 → 0.0.33.285

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: f08684b167a8a9dd2f48caf9441d0c328ce9fef962a3964feeb0fb067a74db6c
4
- data.tar.gz: d006ee0f98934aa7b7146fbd434faa81e696a48e8f391381ed9dd78d4b70be7f
3
+ metadata.gz: e325a01ece3aab8dacd0f932b072d971e54df0e27c0000d905b19f77d51d985b
4
+ data.tar.gz: 61d00470b14d3cd5a2ab0007f1f2fc7161b1dc1ea162f17adac43f8e5377f58a
5
5
  SHA512:
6
- metadata.gz: 04a4903ee82b65803e0cadd5b2235935ce9041f6c442defd558c3d81e14a522a47d6510aaf69e32b71d0bd5c16a9f8590acd7fa7506417ab17789e34fd59f88a
7
- data.tar.gz: 5bae3c73bc973fb0b240b9cfba54cc42e2de35c6257226dc386d130bc0f272a3a2bb770e0d42144f127a2bf3b782b0ce3b6cc9aa8032aa181e1438f0bbc5cf95
6
+ metadata.gz: 96807c7322acdb1068115b5ab73c95233b53cc1eea325da5fa4a854a018f86bc30d6dbba2c696d6c16805abddeae6024008d962161b65660f1ae9fcff20e0123
7
+ data.tar.gz: b23cdb716dfe54f09e7798aad1a33e637783ef1952922867f698dcacb0033f76d0bfdd3d79c3d2525b426405706037157dcb04fb3fd031315ddbfc368c760e0c
@@ -5,7 +5,7 @@ class ::Ish::EmailTemplate
5
5
 
6
6
  field :slug
7
7
  validates_uniqueness_of :slug
8
- validates_presence_of :slug
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/ish/invoice.rb CHANGED
@@ -42,8 +42,13 @@ class Ish::Invoice
42
42
 
43
43
  ## Prawn/pdf unit of measure is 1/72"
44
44
  ## Canvas width: 612, height: 792
45
+ ##
46
+ ## tree image: 896 x 1159
47
+ ## tree image: 791 x 1024
48
+ ## tree image: 964 x 1248
49
+ ##
45
50
  def generate_monthly_invoice
46
- tree_img_url = "#{Rails.root.join('public')}/tree-1.jpg"
51
+ tree_img_url = "#{Rails.root.join('public')}/tree-#{number}.jpg"
47
52
  wasya_co_logo_url = "#{Rails.root.join('public')}/259x66-WasyaCo-logo.png"
48
53
 
49
54
  ## canvas width: 612, height: 792
@@ -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
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.283
4
+ version: 0.0.33.285
5
5
  platform: ruby
6
6
  authors:
7
7
  - piousbox