Class: Workarea::Content::Email
- Inherits:
-
Object
- Object
- Workarea::Content::Email
- Includes:
- ApplicationDocument
- Defined in:
- app/models/workarea/content/email.rb
Class Method Summary collapse
Instance Method Summary collapse
-
#name ⇒ Object
The given
:type
of this email, titleized.
Methods included from ApplicationDocument
Methods included from Sidekiq::Callbacks
add_worker, assert_valid_config!, async, caching_classes?, disable, enable, inline, #run_callbacks, workers, workers_list
Methods included from Mongoid::Document
Class Method Details
.find_by_type(type) ⇒ Object
17 18 19 |
# File 'app/models/workarea/content/email.rb', line 17 def self.find_by_type(type) find_by(type: type) rescue nil end |
.find_content(type) ⇒ Object
13 14 15 |
# File 'app/models/workarea/content/email.rb', line 13 def self.find_content(type) find_by_type(type).try(:content).to_s end |
Instance Method Details
#name ⇒ Object
The given :type
of this email, titleized. Used in the activity feed to display when this email’s content was edited.
26 27 28 |
# File 'app/models/workarea/content/email.rb', line 26 def name type.titleize end |