aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack')
-rw-r--r--actionpack/CHANGELOG2
-rw-r--r--actionpack/lib/action_view/base.rb4
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helper.rb6
-rwxr-xr-xactionpack/lib/action_view/helpers/date_helper.rb6
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb6
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb6
-rw-r--r--actionpack/lib/action_view/helpers/java_script_macros_helper.rb12
-rw-r--r--actionpack/lib/action_view/helpers/number_helper.rb6
-rw-r--r--actionpack/lib/action_view/helpers/text_helper.rb6
9 files changed, 28 insertions, 26 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG
index 00bb2f3fd7..b5fad73118 100644
--- a/actionpack/CHANGELOG
+++ b/actionpack/CHANGELOG
@@ -1,5 +1,7 @@
*SVN*
+* Misc doc fixes (typos/grammar/etc). #2445. [coffee2code]
+
* Speed improvement for session_options. #2287. [skaes@web.de]
* Make cacheing binary files friendly with Windows. #1975. [Rich Olson]
diff --git a/actionpack/lib/action_view/base.rb b/actionpack/lib/action_view/base.rb
index 0215de2de6..c9557fe96e 100644
--- a/actionpack/lib/action_view/base.rb
+++ b/actionpack/lib/action_view/base.rb
@@ -38,7 +38,7 @@ module ActionView #:nodoc:
# result of the rendering. The output embedding writes it to the current template.
#
# But you don't have to restrict yourself to static includes. Templates can share variables amongst themselves by using instance
- # variables defined in using the regular embedding tags. Like this:
+ # variables defined using the regular embedding tags. Like this:
#
# <% @page_title = "A Wonderful Hello" %>
# <%= render "shared/header" %>
@@ -425,4 +425,4 @@ module ActionView #:nodoc:
end
end
-require 'action_view/template_error' \ No newline at end of file
+require 'action_view/template_error'
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helper.rb b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
index a79c01574b..bac905924e 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -49,9 +49,9 @@ module ActionView
# <script type="text/javascript" src="/javascripts/scriptaculous.js"></script>
# <script type="text/javascript" src="/javascripts/application.js"></script> *see beloe
#
- # If there's a <tt>application.js</tt> file in your <tt>public/javascripts</tt> directory,
+ # If there's an <tt>application.js</tt> file in your <tt>public/javascripts</tt> directory,
# <tt>javascript_include_tag :defaults</tt> will automatically include it. This file
- # is thought for small snippets of JavaScript code, along the lines of
+ # facilitates the inclusion of small snippets of JavaScript code, along the lines of
# <tt>controllers/application.rb</tt> and <tt>helpers/application_helper.rb</tt>.
def javascript_include_tag(*sources)
options = sources.last.is_a?(Hash) ? sources.pop.stringify_keys : { }
@@ -103,7 +103,7 @@ module ActionView
compute_public_path(source, 'images', 'png')
end
- # Returns an image tag converting the +options+ instead html options on the tag, but with these special cases:
+ # Returns an image tag converting the +options+ into html options on the tag, but with these special cases:
#
# * <tt>:alt</tt> - If no alt text is given, the file name part of the +src+ is used (capitalized and without the extension)
# * <tt>:size</tt> - Supplied as "XxY", so "30x45" becomes width="30" and height="45"
diff --git a/actionpack/lib/action_view/helpers/date_helper.rb b/actionpack/lib/action_view/helpers/date_helper.rb
index 6323006bd0..ba1834b54e 100755
--- a/actionpack/lib/action_view/helpers/date_helper.rb
+++ b/actionpack/lib/action_view/helpers/date_helper.rb
@@ -13,7 +13,7 @@ module ActionView
module DateHelper
DEFAULT_PREFIX = 'date' unless const_defined?('DEFAULT_PREFIX')
- # Reports the approximate distance in time between to Time objects or integers.
+ # Reports the approximate distance in time between two Time objects or integers.
# For example, if the distance is 47 minutes, it'll return
# "about 1 hour". See the source for the complete wording list.
#
@@ -56,7 +56,7 @@ module ActionView
# Returns a set of select tags (one for year, month, and day) pre-selected for accessing a specified date-based attribute (identified by
# +method+) on an object assigned to the template (identified by +object+). It's possible to tailor the selects through the +options+ hash,
- # which both accepts all the keys that each of the individual select builders does (like :use_month_numbers for select_month) and a range of
+ # which accepts all the keys that each of the individual select builders do (like :use_month_numbers for select_month) as well as a range of
# discard options. The discard options are <tt>:discard_year</tt>, <tt>:discard_month</tt> and <tt>:discard_day</tt>. Set to true, they'll
# drop the respective select. Discarding the month select will also automatically discard the day select. It's also possible to explicitly
# set the order of the tags using the <tt>:order</tt> option with an array of symbols <tt>:year</tt>, <tt>:month</tt> and <tt>:day</tt> in
@@ -96,7 +96,7 @@ module ActionView
select_year(date, options) + select_month(date, options) + select_day(date, options)
end
- # Returns a set of html select-tags (one for year, month, day, hour, and minute) preselected the +datetime+.
+ # Returns a set of html select-tags (one for year, month, day, hour, and minute) pre-selected with the +datetime+.
def select_datetime(datetime = Time.now, options = {})
select_year(datetime, options) + select_month(datetime, options) + select_day(datetime, options) +
select_hour(datetime, options) + select_minute(datetime, options)
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 373f47a39c..95132d130b 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -76,17 +76,17 @@ module ActionView
InstanceTag.new(object, method, self).to_input_field_tag("text", options)
end
- # Works just like text_field, but returns a input tag of the "password" type instead.
+ # Works just like text_field, but returns an input tag of the "password" type instead.
def password_field(object, method, options = {})
InstanceTag.new(object, method, self).to_input_field_tag("password", options)
end
- # Works just like text_field, but returns a input tag of the "hidden" type instead.
+ # Works just like text_field, but returns an input tag of the "hidden" type instead.
def hidden_field(object, method, options = {})
InstanceTag.new(object, method, self).to_input_field_tag("hidden", options)
end
- # Works just like text_field, but returns a input tag of the "file" type instead, which won't have any default value.
+ # Works just like text_field, but returns an input tag of the "file" type instead, which won't have a default value.
def file_field(object, method, options = {})
InstanceTag.new(object, method, self).to_input_field_tag("file", options)
end
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb
index 1daa5782de..261ff76ae0 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -127,11 +127,11 @@ module ActionView
options_for_select.join("\n")
end
- # Returns a string of option tags that has been compiled by iterating over the +collection+ and assigning the
+ # Returns a string of option tags that have been compiled by iterating over the +collection+ and assigning the
# the result of a call to the +value_method+ as the option value and the +text_method+ as the option text.
# If +selected_value+ is specified, the element returning a match on +value_method+ will get the selected option tag.
#
- # Example (call, result). Imagine a loop iterating over each +person+ in <tt>@project.people</tt> to generate a input tag:
+ # Example (call, result). Imagine a loop iterating over each +person+ in <tt>@project.people</tt> to generate an input tag:
# options_from_collection_for_select(@project.people, "id", "name")
# <option value="#{person.id}">#{person.name}</option>
#
@@ -143,7 +143,7 @@ module ActionView
)
end
- # Returns a string of option tags, like options_from_collection_for_select, but surrounds them by <optgroup> tags.
+ # Returns a string of option tags, like options_from_collection_for_select, but surrounds them with <optgroup> tags.
#
# An array of group objects are passed. Each group should return an array of options when calling group_method
# Each group should should return its name when calling group_label_method.
diff --git a/actionpack/lib/action_view/helpers/java_script_macros_helper.rb b/actionpack/lib/action_view/helpers/java_script_macros_helper.rb
index f4c99d422a..c340468fcb 100644
--- a/actionpack/lib/action_view/helpers/java_script_macros_helper.rb
+++ b/actionpack/lib/action_view/helpers/java_script_macros_helper.rb
@@ -3,8 +3,8 @@ require File.dirname(__FILE__) + '/tag_helper'
module ActionView
module Helpers
# Provides a set of helpers for creating JavaScript macros that rely on and often bundle methods from JavaScriptHelper into
- # larger units. These macros also rely on counter parts in the controller that provides them with their backing. The in-place
- # editing relies on ActionController::Base.in_place_edit_for and the auto completion relies on
+ # larger units. These macros also rely on counterparts in the controller that provide them with their backing. The in-place
+ # editing relies on ActionController::Base.in_place_edit_for and the autocompletion relies on
# ActionController::Base.auto_complete_for.
module JavaScriptMacrosHelper
# Makes an HTML element specified by the DOM ID +field_id+ become an in-place
@@ -52,7 +52,7 @@ module ActionView
javascript_tag(function)
end
- # Renders the value of the specified object and method with in place editing capabilities.
+ # Renders the value of the specified object and method with in-place editing capabilities.
#
# See the RDoc on ActionController::InPlaceEditing to learn more about this.
def in_place_editor_field(object, method, tag_options = {}, in_place_editor_options = {})
@@ -88,9 +88,9 @@ module ActionView
# <tt>:indicator</tt>:: Specifies the DOM ID of an element which will be
# displayed while autocomplete is running.
# <tt>:tokens</tt>:: A string or an array of strings containing
- # seperator tokens for tokenized incremental
+ # separator tokens for tokenized incremental
# autocompletion. Example: <tt>:tokens => ','</tt> would
- # allow multiple autocompletion entries, seperated
+ # allow multiple autocompletion entries, separated
# by commas.
# <tt>:min_chars</tt>:: The minimum number of characters that should be
# in the input field before an Ajax call is made
@@ -121,7 +121,7 @@ module ActionView
javascript_tag(function)
end
- # Use this method in your view to generate a return for the AJAX automplete requests.
+ # Use this method in your view to generate a return for the AJAX autocomplete requests.
#
# Example action:
#
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index 6c66616e1a..e06eb14f7f 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -4,8 +4,8 @@ module ActionView
# one of the following forms: phone number, percentage, money, or precision level.
module NumberHelper
- # Formats a +number+ into a US phone number string. The +options+ can be hash used to customize the format of the output.
- # The area code can be surrounded by parenthesis by setting +:area_code+ to true; default is false
+ # Formats a +number+ into a US phone number string. The +options+ can be a hash used to customize the format of the output.
+ # The area code can be surrounded by parentheses by setting +:area_code+ to true; default is false
# The delimiter can be set using +:delimiter+; default is "-"
# Examples:
# number_to_phone(1235551234) => 123-555-1234
@@ -25,7 +25,7 @@ module ActionView
end
end
- # Formates a +number+ into a currency string. The +options+ hash can be used to customize the format of the output.
+ # Formats a +number+ into a currency string. The +options+ hash can be used to customize the format of the output.
# The +number+ can contain a level of precision using the +precision+ key; default is 2
# The currency type can be set using the +unit+ key; default is "$"
# The unit separator can be set using the +separator+ key; default is "."
diff --git a/actionpack/lib/action_view/helpers/text_helper.rb b/actionpack/lib/action_view/helpers/text_helper.rb
index 79ba4ea240..74f7337289 100644
--- a/actionpack/lib/action_view/helpers/text_helper.rb
+++ b/actionpack/lib/action_view/helpers/text_helper.rb
@@ -3,14 +3,14 @@ require File.dirname(__FILE__) + '/tag_helper'
module ActionView
module Helpers #:nodoc:
# Provides a set of methods for working with text strings that can help unburden the level of inline Ruby code in the
- # templates. In the example below we iterate over a collection of posts provided to the template and prints each title
+ # templates. In the example below we iterate over a collection of posts provided to the template and print each title
# after making sure it doesn't run longer than 20 characters:
# <% for post in @posts %>
# Title: <%= truncate(post.title, 20) %>
# <% end %>
module TextHelper
# The regular puts and print are outlawed in eRuby. It's recommended to use the <%= "hello" %> form instead of print "hello".
- # If you absolutely must use a method-based output, you can use concat. It's use like this <% concat "hello", binding %>. Notice that
+ # If you absolutely must use a method-based output, you can use concat. It's used like this: <% concat "hello", binding %>. Notice that
# it doesn't have an equal sign in front. Using <%= concat "hello" %> would result in a double hello.
def concat(string, binding)
eval("_erbout", binding).concat(string)
@@ -115,7 +115,7 @@ module ActionView
# We can't really help what's not there
end
- # Returns +text+ transformed into html using very simple formatting rules
+ # Returns +text+ transformed into HTML using very simple formatting rules
# Surrounds paragraphs with <tt>&lt;p&gt;</tt> tags, and converts line breaks into <tt>&lt;br /&gt;</tt>
# Two consecutive newlines(<tt>\n\n</tt>) are considered as a paragraph, one newline (<tt>\n</tt>) is
# considered a linebreak, three or more consecutive newlines are turned into two newlines