Skip to content

Commit

Permalink
minor fixes in action view guide
Browse files Browse the repository at this point in the history
  • Loading branch information
vijaydev authored and fxn committed Jun 18, 2011
1 parent 391b373 commit ee7043b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions railties/guides/source/action_view_overview.textile
Expand Up @@ -165,7 +165,7 @@ will produce
<em>emphasized</em>
<em><b>emph &amp; bold</b></em>
<a href="http://rubyonrails.org">A link</a>
<target option="fast" name="compile" \>
<target option="fast" name="compile" />
</html>

Any method with a block will be treated as an XML markup tag with nested markup in the block. For example, the following:
Expand Down Expand Up @@ -211,7 +211,7 @@ xml.rss("version" => "2.0", "xmlns:dc" => "http://purl.org/dc/elements/1.1/") do
end
</ruby>

h5. Template caching
h5. Template Caching

By default, Rails will compile each template to a method in order to render it. When you alter a template, Rails will check the file's modification time and recompile it in development mode.

Expand All @@ -235,7 +235,7 @@ This will render a file named +_menu.html.erb+ at that point within the view is

That code will pull in the partial from +app/views/shared/_menu.html.erb+.

h5. Using Partials to Simplify Views
h5. Using Partials to simplify Views

One way to use partials is to treat them as the equivalent of subroutines: as a way to move details out of a view so that you can grasp what's going on more easily. For example, you might have a view that looked like this:

Expand Down

0 comments on commit ee7043b

Please sign in to comment.