Sha256: acfef382dba4cc10af65e3c0562ee53bbde510751894dd8d27201688871e760d

Contents?: true

Size: 1.31 KB

Versions: 35

Compression:

Stored size: 1.31 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 'Show 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? %>'>
      <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' %>
<% end %>

Version data entries

35 entries across 35 versions & 2 rubygems

Version Path
softwear-lib-3.1.4 app/views/softwear/errors/_error.html.erb
softwear-lib-3.1.3 app/views/softwear/errors/_error.html.erb
softwear-lib-3.1.2 app/views/softwear/errors/_error.html.erb
softwear-lib-3.1.1 app/views/softwear/errors/_error.html.erb
softwear-lib-3.1.0 app/views/softwear/errors/_error.html.erb
softwear-lib-3.0.0 app/views/softwear/errors/_error.html.erb
softwear-lib-2.1.7 app/views/softwear/errors/_error.html.erb
softwear-lib-2.1.6 app/views/softwear/errors/_error.html.erb
softwear-lib-2.1.4 app/views/softwear/errors/_error.html.erb
softwear-lib-2.1.3 app/views/softwear/errors/_error.html.erb
softwear-lib-2.1.2 app/views/softwear/errors/_error.html.erb
softwear-lib-2.1.1 app/views/softwear/errors/_error.html.erb
softwear-lib-2.1.0 app/views/softwear/errors/_error.html.erb
softwear-lib-2.0.13 app/views/softwear/errors/_error.html.erb
softwear-lib-2.0.12 app/views/softwear/errors/_error.html.erb
softwear-lib-2.0.11 app/views/softwear/errors/_error.html.erb
softwear-lib-2.0.10 app/views/softwear/errors/_error.html.erb
softwear-lib-2.0.9.2 app/views/softwear/errors/_error.html.erb
softwear-lib-2.0.9.1 app/views/softwear/errors/_error.html.erb
softwear-lib-2.0.9 app/views/softwear/errors/_error.html.erb