Class: Ish::EmailTemplate

Inherits:
Object
  • Object
show all
Includes:
Mongoid::Document, Mongoid::Timestamps
Defined in:
lib/ish/email_template.rb

Constant Summary collapse

LAYOUTS =
%w| plain
m20221201react m20221222merryxmas
marketing_react_1
marketing_ror_1 marketing_ror_2
marketing_wordpres_1 marketing_wordpress_2
piousbox_roundborders
plain
wasyaco_roundborders |
FROM_EMAILS =
[
  'Infinite Shelter <[email protected]>',
  'Infinite Shelter <[email protected]>',
  'Victor Piousbox <[email protected]>',
  'Victor Piousbox <[email protected]>',
  'Victor Piousbox <[email protected]>',
  'Victor Piousbox <[email protected]>',
  'WasyaCo Consulting <[email protected]>',
  'WasyaCo Consulting <[email protected]>',
  'Victor Piousbox <[email protected]>',
]
SLUG_BLANK =
'blank'

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.blank_templateObject



51
52
53
# File 'lib/ish/email_template.rb', line 51

def self.blank_template
  out = Tmpl.find_or_create_by({ slug: SLUG_BLANK })
end

.from_email_listObject



37
38
39
# File 'lib/ish/email_template.rb', line 37

def self.from_email_list
  [ [nil, nil] ] + FROM_EMAILS.map { |i| [i, i] }
end

Instance Method Details

#get_bindingObject

2023-03-04 vp This works!



42
43
44
45
# File 'lib/ish/email_template.rb', line 42

def get_binding
  @lead = Lead.where( email: '[email protected]' ).first
  binding()
end