Skip to content

Commit

Permalink
Fixed layouts_and_rendering guide so that it validates XHTML 1.0 Strict
Browse files Browse the repository at this point in the history
  • Loading branch information
jaimeiniesta committed Apr 4, 2010
1 parent 8f9becb commit 8fa3183
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions railties/guides/source/layouts_and_rendering.textile
Expand Up @@ -510,7 +510,7 @@ def show
end
</ruby>

Make sure you use +and return+ and not +&& return+ because while the former will work, the latter will not due to operator precedence in the Ruby Language.
Make sure you use +and return+ and not +&amp;&amp; return+ because while the former will work, the latter will not due to operator precedence in the Ruby Language.

Note that the implicit render done by ActionController detects if +render+ has been called, and thus avoids this error. Therefore, the following will work without errors:

Expand Down Expand Up @@ -747,7 +747,7 @@ You can even use dynamic paths such as +cache/#{current_site}/main/display+.

h5. Linking to CSS Files with +stylesheet_link_tag+

The +stylesheet_link_tag+ helper returns an HTML +<link>+ tag for each source provided. Rails looks in +public/stylesheets+ for these files by default, but you can specify a full path relative to the document root, or a URL, if you prefer. For example, to include +public/stylesheets/main.cs+:
The +stylesheet_link_tag+ helper returns an HTML +&lt;link&gt;+ tag for each source provided. Rails looks in +public/stylesheets+ for these files by default, but you can specify a full path relative to the document root, or a URL, if you prefer. For example, to include +public/stylesheets/main.cs+:

<erb>
<%= stylesheet_link_tag "main" %>
Expand Down

0 comments on commit 8fa3183

Please sign in to comment.