From f3fb416b89dab8d7b565b174bdc1116a519ab18d Mon Sep 17 00:00:00 2001 From: "Andrey A.I. Sitnik" Date: Thu, 5 Apr 2012 15:32:37 +0400 Subject: Remove unnecessary in HTML 5 type attribute with default value --- guides/source/action_view_overview.textile | 24 ++++++++++++------------ guides/source/asset_pipeline.textile | 12 ++++++------ guides/source/layouts_and_rendering.textile | 10 +++++----- 3 files changed, 23 insertions(+), 23 deletions(-) (limited to 'guides/source') diff --git a/guides/source/action_view_overview.textile b/guides/source/action_view_overview.textile index 42120e9bad..6649974eea 100644 --- a/guides/source/action_view_overview.textile +++ b/guides/source/action_view_overview.textile @@ -550,9 +550,9 @@ Register one or more JavaScript files to be included when symbol is passed to ja ActionView::Helpers::AssetTagHelper.register_javascript_expansion :monkey => ["head", "body", "tail"] javascript_include_tag :monkey # => - - - + + + h5. register_stylesheet_expansion @@ -563,9 +563,9 @@ Register one or more stylesheet files to be included when symbol is passed to +s ActionView::Helpers::AssetTagHelper.register_stylesheet_expansion :monkey => ["head", "body", "tail"] stylesheet_link_tag :monkey # => - - - + + + h5. auto_discovery_link_tag @@ -607,7 +607,7 @@ Returns an html script tag for each of the sources provided. You can pass in the javascript_include_tag "common" # => - + If the application does not use the asset pipeline, to include the jQuery JavaScript library in your application, pass +:defaults+ as the source. When using +:defaults+, if an +application.js+ file exists in your +public/javascripts+ directory, it will be included as well. @@ -626,7 +626,7 @@ You can also cache multiple JavaScript files into one file, which requires less javascript_include_tag :all, :cache => true # => - + h5. javascript_path @@ -651,7 +651,7 @@ Returns a stylesheet link tag for the sources specified as arguments. If you don stylesheet_link_tag "application" # => - + You can also include all styles in the stylesheet directory using :all as the source: @@ -664,7 +664,7 @@ You can also cache multiple stylesheets into one file, which requires less HTTP stylesheet_link_tag :all, :cache => true - + h5. stylesheet_path @@ -805,7 +805,7 @@ For example, let's say we have a standard application layout, but also a special

This is a special page.

<% content_for :special_script do %> - + <% end %> @@ -1501,7 +1501,7 @@ javascript_tag "alert('All is good')" - - - + + + The +body+ param is required by Sprockets. @@ -346,7 +346,7 @@ config.assets.debug = false When debug mode is off, Sprockets concatenates and runs the necessary preprocessors on all files. With debug mode turned off the manifest above would generate instead: - + Assets are compiled and cached on the first request after the server is started. Sprockets sets a +must-revalidate+ Cache-Control HTTP header to reduce request overhead on subsequent requests -- on these the browser gets a 304 (Not Modified) response. @@ -380,8 +380,8 @@ For example this: generates something like this: - - + + The fingerprinting behavior is controlled by the setting of +config.assets.digest+ setting in Rails (which defaults to +true+ for production and +false+ for everything else). diff --git a/guides/source/layouts_and_rendering.textile b/guides/source/layouts_and_rendering.textile index 7c7fc7044c..c2bba56581 100644 --- a/guides/source/layouts_and_rendering.textile +++ b/guides/source/layouts_and_rendering.textile @@ -686,7 +686,7 @@ You can specify a full path relative to the document root, or a URL, if you pref Rails will then output a +script+ tag such as this: - + The request to this asset is then served by the Sprockets gem. @@ -718,8 +718,8 @@ If the application does not use the asset pipeline, the +:defaults+ option loads Outputting +script+ tags such as this: - - + + These two files for jQuery, +jquery.js+ and +jquery_ujs.js+ must be placed inside +public/javascripts+ if the application doesn't use the asset pipeline. These files can be downloaded from the "jquery-rails repository on GitHub":https://github.com/indirect/jquery-rails/tree/master/vendor/assets/javascripts @@ -805,7 +805,7 @@ To include +http://example.com/main.css+: <%= stylesheet_link_tag "http://example.com/main.css" %> -By default, the +stylesheet_link_tag+ creates links with +media="screen" rel="stylesheet" type="text/css"+. You can override any of these defaults by specifying an appropriate option (+:media+, +:rel+, or +:type+): +By default, the +stylesheet_link_tag+ creates links with +media="screen" rel="stylesheet"+. You can override any of these defaults by specifying an appropriate option (+:media+, +:rel+): <%= stylesheet_link_tag "main_print", :media => "print" %> @@ -1206,7 +1206,7 @@ Suppose you have the following +ApplicationController+ layout: <%= @page_title or 'Page Title' %> <%= stylesheet_link_tag 'layout' %> - +
Top menu items here
-- cgit v1.2.3