aboutsummaryrefslogtreecommitdiffstats
path: root/guides
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-02-11 21:47:13 +0100
committerGitHub <noreply@github.com>2017-02-11 21:47:13 +0100
commit40ae9a916f8466b19250f12923b3c26643b8e6b9 (patch)
treeb6ff299d004d48790e8859aa089f5f2ff918fd5d /guides
parent6401e03ef6285a93588a162e651e0b15fcb60a19 (diff)
parent3ea926b86a209d67c210fc105cadcad73984e3e0 (diff)
downloadrails-40ae9a916f8466b19250f12923b3c26643b8e6b9.tar.gz
rails-40ae9a916f8466b19250f12923b3c26643b8e6b9.tar.bz2
rails-40ae9a916f8466b19250f12923b3c26643b8e6b9.zip
Merge pull request #27870 from kenta-s/get-todo-done-in-render_test
Get TODO done in `render_test`
Diffstat (limited to 'guides')
-rw-r--r--guides/source/layouts_and_rendering.md2
1 files changed, 2 insertions, 0 deletions
diff --git a/guides/source/layouts_and_rendering.md b/guides/source/layouts_and_rendering.md
index 293c99fc8f..5a3fadde40 100644
--- a/guides/source/layouts_and_rendering.md
+++ b/guides/source/layouts_and_rendering.md
@@ -411,6 +411,8 @@ render formats: :xml
render formats: [:json, :xml]
```
+If a file with the specified extension does not exist, a `MissingTemplate` error will be raised.
+
#### Finding Layouts
To find the current layout, Rails first looks for a file in `app/views/layouts` with the same base name as the controller. For example, rendering actions from the `PhotosController` class will use `app/views/layouts/photos.html.erb` (or `app/views/layouts/photos.builder`). If there is no such controller-specific layout, Rails will use `app/views/layouts/application.html.erb` or `app/views/layouts/application.builder`. If there is no `.erb` layout, Rails will use a `.builder` layout if one exists. Rails also provides several ways to more precisely assign specific layouts to individual controllers and actions.