mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Fixed layouts_and_rendering guide so that it validates XHTML 1.0 Strict
This commit is contained in:
@@ -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 +&& 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:
|
||||
|
||||
@@ -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 +<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+:
|
||||
|
||||
<erb>
|
||||
<%= stylesheet_link_tag "main" %>
|
||||
|
||||
Reference in New Issue
Block a user