diff options
author | Almudena Garcia <murtra@murtra.net> | 2012-08-23 23:46:16 +0200 |
---|---|---|
committer | Almudena Garcia <murtra@murtra.net> | 2012-08-23 23:46:16 +0200 |
commit | aa41bcd4d818eeb945ee7654593dc647fc9c33ed (patch) | |
tree | 83cde30591a05d0a1ea72ede2e2cb6481cfc994b /guides | |
parent | 5c89e075963b89fbaa86035a120acd27a571d873 (diff) | |
download | rails-aa41bcd4d818eeb945ee7654593dc647fc9c33ed.tar.gz rails-aa41bcd4d818eeb945ee7654593dc647fc9c33ed.tar.bz2 rails-aa41bcd4d818eeb945ee7654593dc647fc9c33ed.zip |
Fix HTML validation errors
Diffstat (limited to 'guides')
-rw-r--r-- | guides/source/asset_pipeline.textile | 4 | ||||
-rw-r--r-- | guides/source/engines.textile | 6 | ||||
-rw-r--r-- | guides/source/form_helpers.textile | 2 | ||||
-rw-r--r-- | guides/source/getting_started.textile | 2 |
4 files changed, 7 insertions, 7 deletions
diff --git a/guides/source/asset_pipeline.textile b/guides/source/asset_pipeline.textile index e385ec4f17..06df428cc3 100644 --- a/guides/source/asset_pipeline.textile +++ b/guides/source/asset_pipeline.textile @@ -70,11 +70,11 @@ The query string strategy has several disadvantages: <ol> <li> - <strong>Not all caches will reliably cache content where the filename only differs by query parameters</strong>.<br> + <strong>Not all caches will reliably cache content where the filename only differs by query parameters</strong>.<br /> "Steve Souders recommends":http://www.stevesouders.com/blog/2008/08/23/revving-filenames-dont-use-querystring/, "...avoiding a querystring for cacheable resources". He found that in this case 5-20% of requests will not be cached. Query strings in particular do not work at all with some CDNs for cache invalidation. </li> <li> - <strong>The file name can change between nodes in multi-server environments.</strong><br> + <strong>The file name can change between nodes in multi-server environments.</strong><br /> The default query string in Rails 2.x is based on the modification time of the files. When assets are deployed to a cluster, there is no guarantee that the timestamps will be the same, resulting in different values being used depending on which server handles the request. </li> <li> diff --git a/guides/source/engines.textile b/guides/source/engines.textile index de4bbb5656..fe8fcfbb3f 100644 --- a/guides/source/engines.textile +++ b/guides/source/engines.textile @@ -217,7 +217,7 @@ This helps prevent conflicts with any other engine or application that may have Finally, two files that are the assets for this resource are generated, +app/assets/javascripts/blorgh/posts.js+ and +app/assets/javascripts/blorgh/posts.css+. You'll see how to use these a little later. -By default, the scaffold styling is not applied to the engine as the engine's layout file, +app/views/blorgh/application.html.erb+ doesn't load it. To make this apply, insert this line into the +<head>+ tag of this layout: +By default, the scaffold styling is not applied to the engine as the engine's layout file, +app/views/blorgh/application.html.erb+ doesn't load it. To make this apply, insert this line into the +<head>+ tag of this layout: <erb> <%= stylesheet_link_tag "scaffold" %> @@ -369,7 +369,7 @@ This partial will be responsible for rendering just the comment text, for now. C <%= comment_counter + 1 %>. <%= comment.text %> </erb> -The +comment_counter+ local variable is given to us by the +<%= render @post.comments %>+ call, as it will define this automatically and increment the counter as it iterates through each comment. It's used in this example to display a small number next to each comment when it's created. +The +comment_counter+ local variable is given to us by the +<%= render @post.comments %>+ call, as it will define this automatically and increment the counter as it iterates through each comment. It's used in this example to display a small number next to each comment when it's created. That completes the comment function of the blogging engine. Now it's time to use it within an application. @@ -536,7 +536,7 @@ Finally, the author's name should be displayed on the post's page. Add this code </p> </erb> -By outputting +@post.author+ using the +<%=+ tag the +to_s+ method will be called on the object. By default, this will look quite ugly: +By outputting +@post.author+ using the +<%=+ tag the +to_s+ method will be called on the object. By default, this will look quite ugly: <plain> #<User:0x00000100ccb3b0> diff --git a/guides/source/form_helpers.textile b/guides/source/form_helpers.textile index 58338ce54b..f2d8755bf0 100644 --- a/guides/source/form_helpers.textile +++ b/guides/source/form_helpers.textile @@ -98,7 +98,7 @@ form_tag({:controller => "people", :action => "search"}, :method => "get", :clas h4. Helpers for Generating Form Elements -Rails provides a series of helpers for generating form elements such as checkboxes, text fields, and radio buttons. These basic helpers, with names ending in "_tag" (such as +text_field_tag+ and +check_box_tag+), generate just a single +<input>+ element. The first parameter to these is always the name of the input. When the form is submitted, the name will be passed along with the form data, and will make its way to the +params+ hash in the controller with the value entered by the user for that field. For example, if the form contains +<%= text_field_tag(:query) %>+, then you would be able to get the value of this field in the controller with +params[:query]+. +Rails provides a series of helpers for generating form elements such as checkboxes, text fields, and radio buttons. These basic helpers, with names ending in "_tag" (such as +text_field_tag+ and +check_box_tag+), generate just a single +<input>+ element. The first parameter to these is always the name of the input. When the form is submitted, the name will be passed along with the form data, and will make its way to the +params+ hash in the controller with the value entered by the user for that field. For example, if the form contains +<%= text_field_tag(:query) %>+, then you would be able to get the value of this field in the controller with +params[:query]+. When naming inputs, Rails uses certain conventions that make it possible to submit parameters with non-scalar values such as arrays or hashes, which will also be accessible in +params+. You can read more about them in "chapter 7 of this guide":#understanding-parameter-naming-conventions. For details on the precise usage of these helpers, please refer to the "API documentation":http://api.rubyonrails.org/classes/ActionView/Helpers/FormTagHelper.html. diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile index 22da369a2a..226c3dce14 100644 --- a/guides/source/getting_started.textile +++ b/guides/source/getting_started.textile @@ -124,7 +124,7 @@ application. Most of the work in this tutorial will happen in the +app/+ folder, |config.ru|Rack configuration for Rack based servers used to start the application.| |db/|Contains your current database schema, as well as the database migrations.| |doc/|In-depth documentation for your application.| -|Gemfile<BR />Gemfile.lock|These files allow you to specify what gem dependencies are needed for your Rails application. These files are used by the Bundler gem. For more information about Bundler, see "the Bundler website":http://gembundler.com | +|Gemfile<br />Gemfile.lock|These files allow you to specify what gem dependencies are needed for your Rails application. These files are used by the Bundler gem. For more information about Bundler, see "the Bundler website":http://gembundler.com | |lib/|Extended modules for your application.| |log/|Application log files.| |public/|The only folder seen to the world as-is. Contains the static files and compiled assets.| |