Sha256: 98853ff70d7242bdf7fb334a1eb2c4e60f68ee256e90d15cc2095c7228632a0c

Contents?: true

Size: 1.4 KB

Versions: 4

Compression:

Stored size: 1.4 KB

Contents

<div>
  Fortunately, a report of this error can be sent to the dev team.
</div>

<% if current_user || !Rails.env.production? %>
  <div>
    <%= link_to 'Toggle error details', '#', id: 'show-error-details-btn', onclick: '$("#error-details").toggle(); return false;', class: 'btn btn-info' %>
    <div id='error-details' style='<%= "display: none;" if Rails.env.production? %> border: 1px solid black; background-color: white;'>
      <p><%= error.class.name %>: <%= error.message %></p>
      <% error.backtrace.each do |line| %>
        <% if backtrace_is_from_app?(line) %>
          <strong><%= line %></strong><br />
        <% else %>
          <%= line %><br />
        <% end %>
      <% end %>
    </div>
  </div>
<% end %>

<%= form_tag softwear.error_report_path, method: :post do %>
  <%= hidden_field_tag 'error_class', error.class.name %>
  <%= hidden_field_tag 'error_message', error.message %>
  <%= hidden_field_tag 'backtrace', error.backtrace.join("\n") %>
  <%= hidden_field_tag 'user_id', current_user.try(:id) %>
  <%= hidden_field_tag 'additional_info', additional_info %>
  <%= hidden_field_tag 'order_id', @order.try(:id) %>

  <div class='form-group'>
    <%= label_tag 'user_message', 'Describe how you reached this error.' %>
    <%= text_area_tag 'user_message', '', class: 'form-control' %>
  </div>

  <%= submit_tag 'Send', class: 'btn btn-info', style: 'width: 100%; margin-bottom: 3em;' %>
<% end %>

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
softwear-lib-3.3.7 app/views/softwear/errors/_error.html.erb
softwear-lib-3.3.6 app/views/softwear/errors/_error.html.erb
softwear-lib-3.3.5 app/views/softwear/errors/_error.html.erb
softwear-lib-3.1.5 app/views/softwear/errors/_error.html.erb