aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
authorPrathamesh Sonpatki <csonpatki@gmail.com>2019-03-12 14:25:29 +0530
committerPrathamesh Sonpatki <csonpatki@gmail.com>2019-03-12 17:01:36 +0530
commitc18166a39bd8e8c2fb857e5acb75e5ff055540b2 (patch)
tree22fb2fd8819d87dadd3ad048f7ce7632be212d27 /actionpack
parentf1b8bb4e1f16e4029ddf05515db0c01942521116 (diff)
downloadrails-c18166a39bd8e8c2fb857e5acb75e5ff055540b2.tar.gz
rails-c18166a39bd8e8c2fb857e5acb75e5ff055540b2.tar.bz2
rails-c18166a39bd8e8c2fb857e5acb75e5ff055540b2.zip
Show friendly message to install action mailbox if the related table does not exist
- This is similar to the work done in https://github.com/rails/rails/pull/31534
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.html.erb3
-rw-r--r--actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb2
2 files changed, 5 insertions, 0 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 d144fc1cd2..77cfdd20c8 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
@@ -13,6 +13,9 @@
<% 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 %>
+ <% if defined?(ActionMailbox) && @exception.message.match?(%r{#{ActionMailbox::InboundEmail.table_name}}) %>
+ <br />To resolve this issue run: rails action_mailbox:install
+ <% end %>
</h2>
<%= render "rescues/source", source_extracts: @source_extracts, show_source_idx: @show_source_idx %>
diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
index 55aaf58713..16c3ecc331 100644
--- a/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
+++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/invalid_statement.text.erb
@@ -6,6 +6,8 @@
<%= @exception.message %>
<% if defined?(ActiveStorage) && @exception.message.match?(%r{#{ActiveStorage::Blob.table_name}|#{ActiveStorage::Attachment.table_name}}) %>
To resolve this issue run: rails active_storage:install
+<% if defined?(ActionMailbox) && @exception.message.match?(%r{#{ActionMailbox::InboundEmail.table_name}}) %>
+To resolve this issue run: rails action_mailbox:install
<% end %>
<%= render template: "rescues/_source" %>