aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
diff options
context:
space:
mode:
authorkurosawat <1717271+7coAim@users.noreply.github.com>2019-02-02 20:04:25 +0900
committerkurosawat <1717271+7coAim@users.noreply.github.com>2019-02-05 20:13:23 +0900
commita0c57775e2ee91d3bd860699c3a3fcb110d0bb08 (patch)
tree6671c9991a27651208c7160870bf06457b507e06 /actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
parent921d1d2d507480f41218e69555d678d41e465524 (diff)
downloadrails-a0c57775e2ee91d3bd860699c3a3fcb110d0bb08.tar.gz
rails-a0c57775e2ee91d3bd860699c3a3fcb110d0bb08.tar.bz2
rails-a0c57775e2ee91d3bd860699c3a3fcb110d0bb08.zip
fix NameError
NameError: uninitialized constant ActionView::CompiledTemplates::ActiveStorage
Diffstat (limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb')
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb2
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
index e8454acfad..d144fc1cd2 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb
@@ -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>