concordia-publishing-house/errbit

View on GitHub
app/views/mailer/err_notification.html.haml

Summary

Maintainability
Test Coverage
%tr
  %td.section
    %table(cellpadding="0" cellspacing="0" border="0" align="left")
      %tbody
        %tr
          %td.content(valign="top")
            %div
              %p
                An err has just occurred in
                = link_to(@app.name, app_url(@app), :class => "bold") << ","
                on the
                %span.bold= @notice.environment_name
                environment.
                %br
                This err has occurred #{pluralize @notice.problem.notices_count, 'time'}.
              %p
                = link_to("Click here to view the error on Errbit", app_problem_url(@app, @notice.problem), :class => "bold") << "."
%tr
  %td.section
    %table(cellpadding="0" cellspacing="0" border="0" align="left")
      %tbody
        %tr
          %td.content(valign="top")
            %div
              %p.heading ERROR MESSAGE:
              %p= @notice.message
              %p.heading WHERE:
              %p.monospace
                = @notice.where
              - @notice.in_app_backtrace_lines.each do |line|
                %p.backtrace
                  = link_to_source_file(line, @notice) do
                    = line.to_s
              %br
              - if @notice.app_version.present?
                %p.heading APP VERSION:
                %p.monospace
                  = @notice.app_version
                %br
              %p.heading URL:
              %p.monospace
                - if @notice.request['url'].present?
                  = link_to @notice.request['url'], @notice.request['url']
              %p.heading BROWSER:
              %p.monospace
                = user_agent_graph(@notice.problem)
              %br
              - if @notice.user_attributes.present?
                %p.heading USER:
                %table
                  - @notice.user_attributes.each do |key, value|
                    %tr
                      %td(style="text-align: right; padding-right: 10px; color: #6a6a6a;")= key.to_s.titleize + ":"
                      %td= auto_link(value.to_s)
                %br
              - if @notice.backtrace_lines.any?
                %br
                %p.heading FULL BACKTRACE:
                - @notice.backtrace_lines.each do |line|
                  %p.backtrace
                    = link_to_source_file(line, @notice) do
                      = line.to_s
                %br