diff --git a/actionpack/CHANGELOG.md b/actionpack/CHANGELOG.md index b3e2ed4d2c3..4e4308967c8 100644 --- a/actionpack/CHANGELOG.md +++ b/actionpack/CHANGELOG.md @@ -1,3 +1,8 @@ +* Fix the error page that is displayed when a view template is missing to account for nested controller paths in the + suggested correct location for the missing template. + + *Joshua Young* + * Add `save_and_open_page` helper to IntegrationTest `save_and_open_page` is a helpful helper to keep a short feedback loop when working on system tests. A similar helper with matching signature has been added to integration tests. diff --git a/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb b/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb index 039ff34501e..e5563034143 100644 --- a/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb @@ -11,7 +11,7 @@
For example, a <%= @exception.controller %>#<%= @exception.action_name %>
action defined in app/controllers/<%= @exception.controller.controller_path %>_controller.rb
should have a corresponding view template
- in a file named app/views/<%= @exception.controller.controller_name %>/<%= @exception.action_name %>.html.erb
.
+ in a file named app/views/<%= @exception.controller.controller_path %>/<%= @exception.action_name %>.html.erb
.
However, if this controller is an API endpoint responding with 204 (No Content), which does not require a view template because it doesn't serve an HTML response, then this error will occur when trying to access it with a browser. In this particular scenario, you can ignore this error.