Class: Email
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Defined in:
- app/models/polymorphic/email.rb
Overview
Schema Information
Table name: emails
id :integer not null, primary key
imap_message_id :string(255) not null
user_id :integer
mediator_id :integer
mediator_type :string(255)
sent_from :string(255) not null
sent_to :string(255) not null
cc :string(255)
bcc :string(255)
subject :string(255)
body :text
header :text
sent_at :datetime
received_at :datetime
deleted_at :datetime
created_at :datetime
updated_at :datetime
state :string(16) default("Expanded"), not null
Instance Method Summary collapse
Instance Method Details
#body ⇒ Object
52 |
# File 'app/models/polymorphic/email.rb', line 52 def body; super; end |
#body_with_textile ⇒ Object
54 55 56 57 58 59 60 |
# File 'app/models/polymorphic/email.rb', line 54 def body_with_textile if defined?(RedCloth) RedCloth.new(body_without_textile).to_html.html_safe else body_without_textile end end |
#collapsed? ⇒ Boolean
50 |
# File 'app/models/polymorphic/email.rb', line 50 def collapsed?; self.state == "Collapsed"; end |
#expanded? ⇒ Boolean
49 |
# File 'app/models/polymorphic/email.rb', line 49 def ; self.state == "Expanded"; end |