1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Merge pull request #35139 from 7coAim/fix_debug_exceptions

Fix NameError : Make debug exceptions works in an environment where ActiveStorage is not loaded.
This commit is contained in:
George Claghorn 2019-02-05 08:36:31 -05:00 committed by GitHub
commit 44232b4854
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -1,3 +1,7 @@
* 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.

View file

@ -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>

View file

@ -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 %>