AyuntamientoMadrid/participacion

View on GitHub
app/views/mailer/comment.html.erb

Summary

Maintainability
Test Coverage
<td style="<%= css_for_mailer_content %>">

  <h1 style="<%= css_for_mailer_heading %>">
    <%= t("mailers.comment.title") %>
  </h1>

  <p style="<%= css_for_mailer_text %>">
    <%= t("mailers.comment.hi") %> <strong><%= @commentable.author.name %></strong>,
  </p>

  <p style="<%= css_for_mailer_text %>">
    <%= sanitize(t("mailers.comment.new_comment_by", commenter: @comment.author.name)) %>
    <%= link_to @commentable.title, commentable_url(@commentable), style: css_for_mailer_link %>
  </p>

  <div style="<%= css_for_mailer_text + css_for_mailer_quote %>">
    <%= mailer_simple_format(@comment.body) %>
  </div>

  <p style="<%= css_for_mailer_text %>">
    <%= sanitize(
      t(
        "mailers.config.unsubscribe_text",
        notifications: link_to(
          t("mailers.config.notifications_link"),
          edit_subscriptions_url(token: @token),
          style: css_for_mailer_link
        ),
        notification: User.human_attribute_name(:email_on_comment)
      ),
      attributes: %w[href style]
    ) %>
  </p>
</td>