Sha256: 452b6842dcce53e16d598ad9a1ed01fb8f488177c77a15048d679cc59ea8477c

Contents?: true

Size: 792 Bytes

Versions: 36

Compression:

Stored size: 792 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 style="list-style-type: none"><%= 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

36 entries across 36 versions & 4 rubygems

Version Path
actionpack-6.1.7.10 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.9 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.8 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.7 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
scrapbook-0.3.2 vendor/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.6 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.5 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.4 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/actionpack-6.1.6.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.3 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.2 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.7 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.6.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.6 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.5.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.5 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.4.7 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.4.6 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.4.5 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb