Sha256: df1e543052ea0e79e35e6348d7d1cda6fd0769ebca12cc409edc4d708025ad27

Contents?: true

Size: 781 Bytes

Versions: 38

Compression:

Stored size: 781 Bytes

Contents

<% if exception.respond_to?(:original_message) && exception.respond_to?(:corrections) %>
  <div class="exception-message">
    <%= simple_format h(exception.original_message), { class: "message" }, wrapper_tag: "div" %>
  </div>
  <%
    # The 'did_you_mean' gem can raise exceptions when calling #corrections on
    # the exception. If it does there are no corrections to show.
    corrections = exception.corrections rescue []
  %>
  <% if corrections.any? %>
    <b>Did you mean?</b>
    <ul>
    <% corrections.each do |correction| %>
      <li class="correction"><%= h correction %></li>
    <% end %>
    </ul>
  <% end %>
<% else %>
  <div class="exception-message">
    <%= simple_format h(exception.message), { class: "message" }, wrapper_tag: "div" %>
  </div>
<% end %>

Version data entries

38 entries across 36 versions & 4 rubygems

Version Path
actionpack-7.0.8.7 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.8.6 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.8.5 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
blacklight-spotlight-3.6.0.beta8 vendor/bundle/ruby/3.2.0/gems/actionpack-7.0.8.4/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
cm-admin-1.5.22 vendor/bundle/ruby/3.3.0/gems/actionpack-7.0.5.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
cm-admin-1.5.21 vendor/bundle/ruby/3.3.0/gems/actionpack-7.0.5.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
cm-admin-1.5.20 vendor/bundle/ruby/3.3.0/gems/actionpack-7.0.5.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.8.4 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.8.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionpack-7.0.2.3/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.8 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.7.2 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.7.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.7 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.6 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.5.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionpack-7.0.2.3/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionpack-7.0.3.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-7.0.5 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb