Class: EmailStyle

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::Serialization
Defined in:
app/models/email_style.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#cssObject

Returns the value of attribute css.



6
7
8
# File 'app/models/email_style.rb', line 6

def css
  @css
end

#default_cssObject

Returns the value of attribute default_css.



6
7
8
# File 'app/models/email_style.rb', line 6

def default_css
  @default_css
end

#default_htmlObject

Returns the value of attribute default_html.



6
7
8
# File 'app/models/email_style.rb', line 6

def default_html
  @default_html
end

#htmlObject

Returns the value of attribute html.



6
7
8
# File 'app/models/email_style.rb', line 6

def html
  @html
end

Class Method Details

.default_cssObject



37
38
39
# File 'app/models/email_style.rb', line 37

def self.default_css
  ""
end

.default_templateObject



32
33
34
35
# File 'app/models/email_style.rb', line 32

def self.default_template
  @_default_template ||=
    File.read(File.join(Rails.root, "app", "views", "email", "default_template.html"))
end

Instance Method Details

#compiled_cssObject



20
21
22
# File 'app/models/email_style.rb', line 20

def compiled_css
  SiteSetting.email_custom_css_compiled.presence || css
end

#idObject



8
9
10
# File 'app/models/email_style.rb', line 8

def id
  "email-style"
end