Skip to content

Commit

Permalink
Show friendly message to install action mailbox if the related table …
Browse files Browse the repository at this point in the history
…does not exist

- This is similar to the work done in rails#31534
  • Loading branch information
prathamesh-sonpatki committed Mar 12, 2019
1 parent f1b8bb4 commit c18166a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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" %>
Expand Down

0 comments on commit c18166a

Please sign in to comment.