app/helpers/maily/application_helper.rb in maily-0.6.3 vs app/helpers/maily/application_helper.rb in maily-0.7.0

- old
+ new

@@ -1,7 +1,21 @@ module Maily module ApplicationHelper + def title + _title = 'Maily' + + if params[:mailer] && params[:email] + _title << " - #{params[:mailer].humanize} | #{params[:email].humanize}" + end + + _title + end + def sidebar_class(mailer, email) - 'maily_selected_mail' if mailer.name == params[:mailer] && email.name == params[:email] + 'selected_mail' if mailer.name == params[:mailer] && email.name == params[:email] + end + + def icon(name) + image_tag "maily/icons/#{name}.svg", class: 'icon' end end end