Module: Maily::EmailsHelper
- Defined in:
- app/helpers/maily/emails_helper.rb
Instance Method Summary collapse
Instance Method Details
#email_description(email) ⇒ Object
7 8 9 10 11 12 13 14 |
# File 'app/helpers/maily/emails_helper.rb', line 7 def email_description(email) return unless email.description content_tag(:div, class: 'mail_description') do concat content_tag(:strong, 'Description ') concat email.description end end |
#part_class(part) ⇒ Object
16 17 18 |
# File 'app/helpers/maily/emails_helper.rb', line 16 def part_class(part) 'format_selected' if (part == params[:part]) || (part == 'html' && !params[:part]) end |
#total_emails(mailers) ⇒ Object
3 4 5 |
# File 'app/helpers/maily/emails_helper.rb', line 3 def total_emails(mailers) mailers.map { |mailer| mailer.total_emails }.sum end |