diff --git a/app/controllers/errors_controller.rb b/app/controllers/errors_controller.rb deleted file mode 100644 index 65781559f..000000000 --- a/app/controllers/errors_controller.rb +++ /dev/null @@ -1,27 +0,0 @@ -class ErrorsController < ApplicationController - GITHUB_BUG_REPORT_DOMAINS = ["dev.to", "forem.dev"].freeze - GITHUB_BUG_REPORT_URL = "https://github.com/forem/forem/issues/new?template=bug_report.md".freeze - - # HTTP 404 - Not Found - https://httpstatuses.com/400 - def not_found - render status: :not_found - end - - # HTTP 422 - Unprocessable Entity - https://httpstatuses.com/422 - def unprocessable_entity - render status: :unprocessable_entity - end - - # HTTP 500 - Internal Server Error - https://httpstatuses.com/500 - def internal_server_error - @github_bug_report_url = GITHUB_BUG_REPORT_URL - @display_github_bug_report_url = SiteConfig.app_domain.in?(GITHUB_BUG_REPORT_DOMAINS) - - render status: :internal_server_error - end - - # HTTP 503 - Service Unavailable - https://httpstatuses.com/503 - def service_unavailable - render status: :service_unavailable - end -end diff --git a/app/models/comment.rb b/app/models/comment.rb index 801e445f9..1662d0a7b 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -75,7 +75,7 @@ class Comment < ApplicationRecord def path "/#{user.username}/comment/#{id_code_generated}" rescue StandardError - "/404" + "/404.html" end def parent_or_root_article diff --git a/app/views/errors/internal_server_error.html.erb b/app/views/errors/internal_server_error.html.erb deleted file mode 100644 index 8fc95f755..000000000 --- a/app/views/errors/internal_server_error.html.erb +++ /dev/null @@ -1,87 +0,0 @@ - - -
-
-
- Our team has been notified.
-
- <% if @display_github_bug_report_url %>
- Please feel welcome to also submit a public
- bug report.
- <% end %>
-
-
- We apologize for any inconvenience.
-
Our team has been notified.
-
+
We apologize for any inconvenience.