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.4.4 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.4.3 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.4.2 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
date_n_time_picker_activeadmin-0.1.2 vendor/bundle/ruby/2.6.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
date_n_time_picker_activeadmin-0.1.1 vendor/bundle/ruby/2.6.0/gems/actionpack-6.1.4.1/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.4.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
rails_mini_profiler-0.2.0 vendor/bundle/ruby/3.0.0/gems/actionpack-6.1.4/lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.4 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.3.2 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.3.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.3 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.2.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.2 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.1 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.0 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb
actionpack-6.1.0.rc2 lib/action_dispatch/middleware/templates/rescues/_message_and_suggestions.html.erb