Browse Source

Added files for 500 page and email error report

development
Godwin 9 years ago
parent
commit
98a33e42ee
  1. BIN
      app/assets/images/parts.jpg
  2. 4
      app/views/application/500.html.haml
  3. 50
      app/views/user_mailer/error_report.html.haml

BIN
app/assets/images/parts.jpg

Binary file not shown.

After

Width:  |  Height:  |  Size: 298 KiB

4
app/views/application/500.html.haml

@ -0,0 +1,4 @@
= render :partial => 'application/header', :locals => {:image_file => 'parts.jpg'}
= row do
= columns(medium: 12) do
= paragraph(_'error.500.description', :p)

50
app/views/user_mailer/error_report.html.haml

@ -0,0 +1,50 @@
%p=@message if @message.present?
%p=@report
- if @exception.present? && @exception.respond_to?(:backtrace)
%h1 Backtrace
%pre=@exception.backtrace.join("\n")
%h1 Details
%table
%tr
%th Key
%th Value
%tr
%td User ID
%td=@user.present? ? @user.id : ''
%tr
%td User Name
%td=@user.present? ? @user.name : ''
%tr
%td User Email
%td=@user.present? ? @user.email : ''
%tr
%td IP Address
%td=@request.remote_ip
%tr
%td UUID
%td=@request.uuid
%tr
%td URL
%td=@request.original_url
%h1 Params
%table
%tr
%th Key
%th Value
- @params.each do | key, value |
%tr
%td=key.to_s
%td=value.to_s
%h1 Request Environment
%table
%tr
%th Key
%th Value
- @request.env.each do | key, value |
%tr
%td=key.to_s
%td=value.to_s
Loading…
Cancel
Save