From 490b52ee8e9110d2cc484c3ef420af37c381e94b Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Sun, 27 May 2012 20:01:55 +0530 Subject: some asset path changes and formatting fixes in AV overview [ci skip] --- guides/source/action_view_overview.textile | 22 ++++++++++------------ 1 file changed, 10 insertions(+), 12 deletions(-) (limited to 'guides') diff --git a/guides/source/action_view_overview.textile b/guides/source/action_view_overview.textile index 734fdd895b..fdfa97effa 100644 --- a/guides/source/action_view_overview.textile +++ b/guides/source/action_view_overview.textile @@ -454,7 +454,7 @@ input("post", "title") # => h4. RecordTagHelper -This module provides methods for generating a container tag, such as a +
+, for your record. This is the recommended way of creating a container for render your Active Record object, as it adds an appropriate class and id attributes to that container. You can then refer to those containers easily by following the convention, instead of having to think about which class or id attribute you should use. +This module provides methods for generating container tags, such as +div+, for your record. This is the recommended way of creating a container for render your Active Record object, as it adds an appropriate class and id attributes to that container. You can then refer to those containers easily by following the convention, instead of having to think about which class or id attribute you should use. h5. content_tag_for @@ -580,13 +580,13 @@ h5. image_path Computes the path to an image asset in the +app/assets/images+ directory. Full paths from the document root will be passed through. Used internally by +image_tag+ to build the image path. -image_path("edit.png") # => /images/edit.png +image_path("edit.png") # => /assets/edit.png Fingerprint will be added to the filename if config.assets.digest is set to true. -image_path("edit.png") # => /images/edit-2d1a2db63fc738690021fedb5a65b68e.png +image_path("edit.png") # => /assets/edit-2d1a2db63fc738690021fedb5a65b68e.png h5. image_url @@ -594,7 +594,7 @@ h5. image_url Computes the url to an image asset in the +app/asset/images+ directory. This will call +image_path+ internally and merge with your current host or your asset host. -image_url("edit.png") # => http://www.example.com/images/edit.png +image_url("edit.png") # => http://www.example.com/assets/edit.png h5. image_tag @@ -602,7 +602,7 @@ h5. image_tag Returns an html image tag for the source. The source can be a full path or a file that exists in your +app/assets/images+ directory. -image_tag("icon.png") # => Icon +image_tag("icon.png") # => Icon h5. javascript_include_tag @@ -610,8 +610,7 @@ h5. javascript_include_tag Returns an html script tag for each of the sources provided. You can pass in the filename (+.js+ extension is optional) of JavaScript files that exist in your +app/assets/javascripts+ directory for inclusion into the current page or you can pass the full path relative to your document root. -javascript_include_tag "common" # => - +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 +app/assets/javascripts+ directory, it will be included as well. @@ -638,7 +637,7 @@ h5. javascript_path Computes the path to a JavaScript asset in the +app/assets/javascripts+ directory. If the source filename has no extension, +.js+ will be appended. Full paths from the document root will be passed through. Used internally by +javascript_include_tag+ to build the script path. -javascript_path "common" # => /javascripts/common.js +javascript_path "common" # => /assets/common.js h5. javascript_url @@ -646,7 +645,7 @@ h5. javascript_url Computes the url to a JavaScript asset in the +app/assets/javascripts+ directory. This will call +javascript_path+ internally and merge with your current host or your asset host. -javascript_url "common" # => http://www.example.com/javascripts/common.js +javascript_url "common" # => http://www.example.com/assets/common.js h5. stylesheet_link_tag @@ -654,8 +653,7 @@ h5. stylesheet_link_tag Returns a stylesheet link tag for the sources specified as arguments. If you don't specify an extension, +.css+ will be appended automatically. -stylesheet_link_tag "application" # => - +stylesheet_link_tag "application" # => You can also include all styles in the stylesheet directory using :all as the source: @@ -668,7 +666,7 @@ You can also cache multiple stylesheets into one file, which requires less HTTP stylesheet_link_tag :all, :cache => true - +# => h5. stylesheet_path -- cgit v1.2.3