AlchemyCMS/alchemy_cms

View on GitHub
app/views/alchemy/base/500.html.erb

Summary

Maintainability
Test Coverage
<%= content_for :toolbar do %>
  <%= render Alchemy::Admin::ToolbarButton.new(
    icon: 'angle-double-left',
    url: request.referer || alchemy.admin_dashboard_path,
    label: Alchemy.t(:back),
    title: Alchemy.t(:back),
    hotkey: 'alt+z',
    dialog: false,
    skip_permission_check: true
  ) %>
<% end %>

<% content_for(:alchemy_body_class) { 'error' } %>

<%= render_message(:error) do %>
  <h1><%= Alchemy.t('An error happened') %></h1>
  <h2>
    <%= @error.class %>
    <%= @notice %>
  </h2>
  <details>
    <summary><%= Alchemy.t('Show error details') %></summary>
    <% @trace.each do |line| %>
      <%= line %><br>
    <% end %>
  </details>
<% end %>