From 2b847a0a9b56c7ede40012c7b3bd8ec90d6c111c Mon Sep 17 00:00:00 2001 From: Vijay Dev Date: Tue, 4 Dec 2012 22:06:34 +0530 Subject: copy edits [ci skip] --- .../lib/action_view/helpers/asset_tag_helper.rb | 5 +---- .../lib/action_view/helpers/capture_helper.rb | 13 ++++-------- actionpack/lib/action_view/helpers/form_helper.rb | 3 +-- .../lib/action_view/helpers/number_helper.rb | 24 +++++++++++----------- 4 files changed, 18 insertions(+), 27 deletions(-) (limited to 'actionpack/lib') diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb index dd837ebba5..cf2a117966 100644 --- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb +++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb @@ -68,9 +68,6 @@ module ActionView # to "screen", so you must explicitely set it to "all" for the stylesheet(s) to # apply to all media types. # - # When the Asset Pipeline is enabled, the helper is usually employed to load the manifest - # file to be processed by it. - # # stylesheet_link_tag "style" # # => # @@ -147,7 +144,7 @@ module ActionView # you can override "rel" and "type". # # ==== Options - # * :rel - Specify the relation of this link, defaults to 'shortcut icon' + # * :rel - Specify the relation of this link, defaults to 'shortcut icon' # * :type - Override the auto-generated mime type, defaults to 'image/vnd.microsoft.icon' # # favicon_link_tag '/myicon.ico' diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb index d7fc3d5c4b..4ec860d69a 100644 --- a/actionpack/lib/action_view/helpers/capture_helper.rb +++ b/actionpack/lib/action_view/helpers/capture_helper.rb @@ -105,8 +105,7 @@ module ActionView # <% end %> # # That will place +script+ tags for your default set of JavaScript files on the page; - # this technique is useful if you'll only be using these scripts in a few views, like, - # for example, external libs such as Google Maps. + # this technique is useful if you'll only be using these scripts in a few views. # # Note that content_for concatenates (default) the blocks it is given for a particular # identifier in order. For example: @@ -145,8 +144,7 @@ module ActionView # # <% content_for :script, javascript_include_tag(:defaults) %> # - # WARNING: content_for is ignored in caches since there won't be processed. - # So you shouldn't use it for elements that will be fragment cached. + # WARNING: content_for is ignored in caches. So you shouldn't use it for elements that will be fragment cached. def content_for(name, content = nil, options = {}, &block) if content || block_given? if block_given? @@ -173,11 +171,8 @@ module ActionView result unless content end - # content_for? simply checks whether any content has already been captured - # yet using content_for. Useful to render parts of your layout differently - # based on what is in your views. - # - # Perhaps you will use different css in you layout if no content_for :right_column + # content_for? checks whether any content has been captured yet using `content_for`. + # Useful to render parts of your layout differently based on what is in your views. # # <%# This is the layout %> # diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb index bebd39d42d..17386a57b8 100644 --- a/actionpack/lib/action_view/helpers/form_helper.rb +++ b/actionpack/lib/action_view/helpers/form_helper.rb @@ -109,8 +109,7 @@ module ActionView # # error handling # end # - # That's how you typically work with resources. Note that it - # would probably improve by using the Strong Parameters functionality + # That's how you typically work with resources. module FormHelper extend ActiveSupport::Concern diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb index 96ab47a0a3..9e1be65b1a 100644 --- a/actionpack/lib/action_view/helpers/number_helper.rb +++ b/actionpack/lib/action_view/helpers/number_helper.rb @@ -88,7 +88,7 @@ module ActionView # number_to_currency(1234567890.506, locale: :fr) # => 1 234 567 890,51 € # number_to_currency("123a456") # => $123a456 # - # number_to_currency("123a456", raise: true) # => InvalidNumberError + # number_to_currency("123a456", raise: true) # => InvalidNumberError # # number_to_currency(-1234567890.50, negative_format: "(%u%n)") # # => ($1,234,567,890.50) @@ -171,7 +171,7 @@ module ActionView # number_with_delimiter(98765432.98, delimiter: " ", separator: ",") # # => 98 765 432,98 # - # number_with_delimiter("112a", raise: true) # => raise InvalidNumberError + # number_with_delimiter("112a", raise: true) # => raise InvalidNumberError def number_with_delimiter(number, options = {}) options = escape_unsafe_delimiters_and_separators(options.symbolize_keys) @@ -202,19 +202,19 @@ module ActionView # * :raise - If true, raises +InvalidNumberError+ when # the argument is invalid. # - # number_with_precision(111.2345) # => 111.235 + # number_with_precision(111.2345) # => 111.235 # number_with_precision(111.2345, precision: 2) # => 111.23 # number_with_precision(13, precision: 5) # => 13.00000 # number_with_precision(389.32314, precision: 0) # => 389 # number_with_precision(111.2345, significant: true) # => 111 - # number_with_precision(111.2345, precision: 1, significant: true) # => 100 - # number_with_precision(13, precision: 5, significant: true) # => 13.000 + # number_with_precision(111.2345, precision: 1, significant: true) # => 100 + # number_with_precision(13, precision: 5, significant: true) # => 13.000 # number_with_precision(111.234, locale: :fr) # => 111,234 # # number_with_precision(13, precision: 5, significant: true, strip_insignificant_zeros: true) # # => 13 # - # number_with_precision(389.32314, precision: 4, significant: true) # => 389.3 + # number_with_precision(389.32314, precision: 4, significant: true) # => 389.3 # number_with_precision(1111.2345, precision: 2, separator: ',', delimiter: '.') # # => 1.111,23 def number_with_precision(number, options = {}) @@ -366,12 +366,12 @@ module ActionView # # Then you could do: # - # number_to_human(543934, units: :distance) # => "544 kilometers" - # number_to_human(54393498, units: :distance) # => "54400 kilometers" - # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" - # number_to_human(343, units: :distance, precision: 1) # => "300 meters" - # number_to_human(1, units: :distance) # => "1 meter" - # number_to_human(0.34, units: :distance) # => "34 centimeters" + # number_to_human(543934, units: :distance) # => "544 kilometers" + # number_to_human(54393498, units: :distance) # => "54400 kilometers" + # number_to_human(54393498000, units: :distance) # => "54.4 gazillion-distance" + # number_to_human(343, units: :distance, precision: 1) # => "300 meters" + # number_to_human(1, units: :distance) # => "1 meter" + # number_to_human(0.34, units: :distance) # => "34 centimeters" # def number_to_human(number, options = {}) options = escape_unsafe_delimiters_and_separators(options.symbolize_keys) -- cgit v1.2.3