Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

copy edits [ci skip]

  • Loading branch information...
commit 2b847a0a9b56c7ede40012c7b3bd8ec90d6c111c 1 parent b5de0ac
@vijaydev vijaydev authored
View
5 actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -68,9 +68,6 @@ def javascript_include_tag(*sources)
# 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"
# # => <link href="/assets/style.css" media="screen" rel="stylesheet" />
#
@@ -147,7 +144,7 @@ def auto_discovery_link_tag(type = :rss, url_options = {}, tag_options = {})
# you can override "rel" and "type".
#
# ==== Options
- # * <tt>:rel</tt> - Specify the relation of this link, defaults to 'shortcut icon'
+ # * <tt>:rel</tt> - Specify the relation of this link, defaults to 'shortcut icon'
# * <tt>:type</tt> - Override the auto-generated mime type, defaults to 'image/vnd.microsoft.icon'
#
# favicon_link_tag '/myicon.ico'
View
13 actionpack/lib/action_view/helpers/capture_helper.rb
@@ -105,8 +105,7 @@ def capture(*args)
# <% 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 @@ def capture(*args)
#
# <% 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 @@ def provide(name, content = nil, &block)
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 %>
# <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
View
3  actionpack/lib/action_view/helpers/form_helper.rb
@@ -109,8 +109,7 @@ module Helpers
# # 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
View
24 actionpack/lib/action_view/helpers/number_helper.rb
@@ -88,7 +88,7 @@ def number_to_phone(number, options = {})
# 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 @@ def number_to_percentage(number, options = {})
# 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 @@ def number_with_delimiter(number, options = {})
# * <tt>:raise</tt> - 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 @@ def number_to_human_size(number, options = {})
#
# 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)
Please sign in to comment.
Something went wrong with that request. Please try again.