From ad31635ef385777a92b1715c70ebdf8f4dca770e Mon Sep 17 00:00:00 2001 From: Nathan Broadbent Date: Sun, 4 Sep 2011 01:26:13 +0800 Subject: [PATCH] Rewrote the err_notification text email to conform it to the new html template --- app/views/mailer/err_notification.text.erb | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/app/views/mailer/err_notification.text.erb b/app/views/mailer/err_notification.text.erb index c51ca25..5b07401 100644 --- a/app/views/mailer/err_notification.text.erb +++ b/app/views/mailer/err_notification.text.erb @@ -1,10 +1,32 @@ -An err has just occurred in <%= @notice.err.environment %>: <%= raw(@notice.err.message) %> +An err has just occurred in <%= @app.name %>, on the <%= @notice.err.environment %> environment. -This err has occurred <%= pluralize @notice.err.notices_count, 'time' %>. You should really look into it here: +This err has occurred <%= pluralize @notice.err.notices_count, 'time' %>. - <%= app_err_url(@app, @notice.err) %> +You can view it on Errbit here: <%= app_err_url(@app, @notice.err) %> -Backtrace follows: -<%= @notice.backtrace.collect { |l| l ? " #{l['file']}:#{l['number']}" : nil }.compact.join("\n") %> +ERROR MESSAGE: + +<%= raw(@notice.err.message) %> + + +WHERE: + +<%= @notice.err.where %> + +<% @notice.app_backtrace.map {|l| "#{l['file']}:#{l['number']}" }.each do |line| %> + <%= line %> +<% end %> + + +URL: + +<%= @notice.request['url'] %> + + +BACKTRACE: + +<% @notice.backtrace.map {|l| l ? "#{l['file']}:#{l['number']}" : nil }.compact.each do |line| %> + <%= line %> +<% end %> -- libgit2 0.21.2