未验证 提交 44232b48 编写于 作者: G George Claghorn 提交者: GitHub

Merge pull request #35139 from 7coAim/fix_debug_exceptions

Fix NameError : Make debug exceptions works in an environment where ActiveStorage is not loaded.
* Make debug exceptions works in an environment where ActiveStorage is not loaded.
*Tomoyuki Kurosawa*
* `ActionDispatch::SystemTestCase.driven_by` can now be called with a block
to define specific browser capabilities.
......
......@@ -10,7 +10,7 @@
<div id="container">
<h2>
<%= h @exception.message %>
<% if @exception.message.match? %r{#{ActiveStorage::Blob.table_name}|#{ActiveStorage::Attachment.table_name}} %>
<% if defined?(ActiveStorage) && @exception.message.match?(%r{#{ActiveStorage::Blob.table_name}|#{ActiveStorage::Attachment.table_name}}) %>
<br />To resolve this issue run: rails active_storage:install
<% end %>
</h2>
......
......@@ -4,7 +4,7 @@
<% end %>
<%= @exception.message %>
<% if @exception.message.match? %r{#{ActiveStorage::Blob.table_name}|#{ActiveStorage::Attachment.table_name}} %>
<% if defined?(ActiveStorage) && @exception.message.match?(%r{#{ActiveStorage::Blob.table_name}|#{ActiveStorage::Attachment.table_name}}) %>
To resolve this issue run: rails active_storage:install
<% end %>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册