Skip to content

Commit

Permalink
Merge branch 'jonatack-patch-8'
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed Aug 22, 2014
2 parents 777c39c + 95b7824 commit 58d9888
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions guides/source/generators.md
Expand Up @@ -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 %>
Expand Down

0 comments on commit 58d9888

Please sign in to comment.