aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb
diff options
context:
space:
mode:
authorGenadi Samokovarov <gsamokovarov@gmail.com>2018-12-29 17:27:33 +0200
committerGenadi Samokovarov <gsamokovarov@gmail.com>2019-04-19 14:15:22 +0900
commita3110fe20bc418034332bd01165df7fe6f20258e (patch)
tree2bbddbe477f6078d1d75f9614c40953dc4ad09a6 /actionpack/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb
parent54df392bc51dcf424f07ccc10157a5969256ba73 (diff)
downloadrails-a3110fe20bc418034332bd01165df7fe6f20258e.tar.gz
rails-a3110fe20bc418034332bd01165df7fe6f20258e.tar.bz2
rails-a3110fe20bc418034332bd01165df7fe6f20258e.zip
Drop the ambiguous `ActiveSupport::ActionableError#===` check
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb')
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb24
1 files changed, 11 insertions, 13 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb
index e181b6c539..b6c6d2f50d 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/_actions.html.erb
@@ -1,15 +1,13 @@
-<% if ActiveSupport::ActionableError === exception %>
- <% actions = ActiveSupport::ActionableError.actions(exception) %>
+<% actions = ActiveSupport::ActionableError.actions(exception) %>
- <% if actions.any? %>
- <div class="actions">
- <% actions.each do |action, _| %>
- <%= button_to action, ActionDispatch::ActionableExceptions.endpoint, params: {
- error: exception.class.name,
- action: action,
- location: request.path
- } %>
- <% end %>
- </div>
- <% end %>
+<% if actions.any? %>
+ <div class="actions">
+ <% actions.each do |action, _| %>
+ <%= button_to action, ActionDispatch::ActionableExceptions.endpoint, params: {
+ error: exception.class.name,
+ action: action,
+ location: request.path
+ } %>
+ <% end %>
+ </div>
<% end %>