Follow up on #16408

[skip ci]
This commit is contained in:
Jon Atack 2014-08-15 16:00:52 +02:00 committed by Zachary Scott
parent 777c39c41c
commit 95b78248eb
1 changed files with 6 additions and 2 deletions

View File

@ -341,13 +341,17 @@ end
If you generate another resource, you can see that we get exactly the same result! This is useful if you want to customize your scaffold templates and/or layout by just creating `edit.html.erb`, `index.html.erb` and so on inside `lib/templates/erb/scaffold`.
Many scaffold templates in Rails are written in ERB tags which need to be escaped, so that the output is valid ERB code. For example,
Scaffold templates in Rails frequently use ERB tags; these tags need to be
escaped so that the generated output is valid ERB code.
For example, the following escaped ERB tag would be needed in the template
(note the extra `%`)...
```ruby
<%%= stylesheet_include_tag :application %>
```
when passed through the generator, would generate the following output.
...to generate the following output:
```ruby
<%= stylesheet_include_tag :application %>