From 297a579de4f8cb8d8144b18d85ee370558c0977c Mon Sep 17 00:00:00 2001 From: Vinicius Stock Date: Tue, 30 May 2017 11:12:34 -0300 Subject: Create MissingExactTemplate exception with separate template --- .../templates/rescues/missing_exact_template.html.erb | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb (limited to 'actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb') 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 new file mode 100644 index 0000000000..3621ea81de --- /dev/null +++ b/actionpack/lib/action_dispatch/middleware/templates/rescues/missing_exact_template.html.erb @@ -0,0 +1,19 @@ +
+

No template for interactive request

+
+ +
+

<%= h @exception.message %>

+ +

+ NOTE!
+ Unless told otherwise, Rails expects an action to render a template with the same name,
+ contained in a folder named after its controller. + + If this controller is an API responding with 204 (No Content),
+ which does not require a template, + then this error will occur when trying to access it via browser,
+ since we expect an HTML template + to be rendered for such requests. If that's the case, carry on. +

+
-- cgit v1.2.3