[Fix #51095] Missing template error page showing incorrect view path example for nested controller path

This commit is contained in:
Joshua Young 2024-02-15 18:36:07 +10:00 committed by Rafael Mendonça França
parent 1083a9ca2c
commit 79f2099fb1
No known key found for this signature in database
GPG Key ID: FC23B6D0F1EEE948
2 changed files with 6 additions and 1 deletions

View File

@ -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.

View File

@ -11,7 +11,7 @@
</p>
<p>
For example, a <code><%= @exception.controller %>#<%= @exception.action_name %></code> action defined in <code>app/controllers/<%= @exception.controller.controller_path %>_controller.rb</code> should have a corresponding view template
in a file named <code>app/views/<%= @exception.controller.controller_name %>/<%= @exception.action_name %>.html.erb</code>.
in a file named <code>app/views/<%= @exception.controller.controller_path %>/<%= @exception.action_name %>.html.erb</code>.
</p>
<p>
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.