Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix typos (closes #10378)

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
commit 2af36bbbd4c5a9967e5f3b4263100ef793aee4d7 1 parent c27b9db
@dhh dhh authored
Showing with 35 additions and 35 deletions.
  1. +1 −1  actionmailer/Rakefile
  2. +1 −1  actionpack/lib/action_controller/assertions.rb
  3. +6 −6 actionpack/lib/action_controller/base.rb
  4. +1 −1  actionpack/lib/action_controller/layout.rb
  5. +1 −1  actionpack/lib/action_controller/rescue.rb
  6. +1 −1  actionpack/lib/action_controller/routing_optimisation.rb
  7. +1 −1  actionpack/lib/action_view/helpers/asset_tag_helper.rb
  8. +4 −4 actionpack/lib/action_view/helpers/date_helper.rb
  9. +1 −1  actionpack/lib/action_view/helpers/number_helper.rb
  10. +1 −1  actionpack/lib/action_view/helpers/url_helper.rb
  11. +2 −2 actionpack/test/controller/routing_test.rb
  12. +2 −2 actionpack/test/controller/selector_test.rb
  13. +1 −1  actionpack/test/controller/test_test.rb
  14. +1 −1  activerecord/lib/active_record/aggregations.rb
  15. +1 −1  activerecord/lib/active_record/associations.rb
  16. +1 −1  activerecord/lib/active_record/associations/has_many_through_association.rb
  17. +1 −1  activerecord/lib/active_record/attribute_methods.rb
  18. +1 −1  activerecord/lib/active_record/callbacks.rb
  19. +1 −1  activerecord/test/validations_test.rb
  20. +1 −1  activesupport/lib/active_support/core_ext/array/conversions.rb
  21. +1 −1  activesupport/test/multibyte_handler_test.rb
  22. +2 −2 railties/lib/initializer.rb
  23. +1 −1  railties/lib/rails/plugin/loader.rb
  24. +1 −1  railties/test/generators/generator_test_helper.rb
View
2  actionmailer/Rakefile
@@ -29,7 +29,7 @@ Rake::TestTask.new { |t|
}
-# Genereate the RDoc documentation
+# Generate the RDoc documentation
Rake::RDocTask.new { |rdoc|
rdoc.rdoc_dir = 'doc'
rdoc.title = "Action Mailer -- Easy email delivery and testing"
View
2  actionpack/lib/action_controller/assertions.rb
@@ -16,7 +16,7 @@ module ActionController #:nodoc:
# assert flash.empty? # makes sure that there's nothing in the flash
#
# For historic reasons, the assigns hash uses string-based keys. So assigns[:person] won't work, but assigns["person"] will. To
- # appease our yearning for symbols, though, an alternative accessor has been deviced using a method call instead of index referencing.
+ # appease our yearning for symbols, though, an alternative accessor has been devised using a method call instead of index referencing.
# So assigns(:person) will work just like assigns["person"], but again, assigns[:person] will not work.
#
# On top of the collections, you have the complete url that a given action redirected to available in redirect_to_url.
View
12 actionpack/lib/action_controller/base.rb
@@ -164,7 +164,7 @@ class UnknownHttpMethod < ActionControllerError #:nodoc:
# For removing objects from the session, you can either assign a single key to nil, like <tt>session[:person] = nil</tt>, or you can
# remove the entire session with reset_session.
#
- # Sessions are stored in a browser cookie that's crytographically signed, but unencrypted, by default. This prevents
+ # Sessions are stored in a browser cookie that's cryptographically signed, but unencrypted, by default. This prevents
# the user from tampering with the session but also allows him to see its contents.
#
# Do not put secret information in session!
@@ -293,7 +293,7 @@ class Base
# The param_parsers hash lets you register handlers which will process the http body and add parameters to the
# <tt>params</tt> hash. These handlers are invoked for post and put requests.
#
- # By default application/xml is enabled. A XmlSimple class with the same param name as the root will be instanciated
+ # By default application/xml is enabled. A XmlSimple class with the same param name as the root will be instantiated
# in the <tt>params</tt>. This allows XML requests to mask themselves as regular form submissions, so you can have one
# action serve both regular forms and web service requests.
#
@@ -454,10 +454,10 @@ def append_view_path(path)
view_paths.push(*path)
end
- # Replace sensitive paramater data from the request log.
- # Filters paramaters that have any of the arguments as a substring.
+ # Replace sensitive parameter data from the request log.
+ # Filters parameters that have any of the arguments as a substring.
# Looks in all subhashes of the param hash for keys to filter.
- # If a block is given, each key and value of the paramater hash and all
+ # If a block is given, each key and value of the parameter hash and all
# subhashes is passed to it, the value or key
# can be replaced using String#replace or similar method.
#
@@ -590,7 +590,7 @@ def process(request, response, method = :perform_action, *arguments) #:nodoc:
# However, you might ask why the action from the current request, 'contacts', isn't carried over into the new URL. The
# answer has to do with the order in which the parameters appear in the generated path. In a nutshell, since the
# value that appears in the slot for <tt>:first</tt> is not equal to default value for <tt>:first</tt> we stop using
- # defaults. On it's own, this rule can account for much of the typical Rails URL behavior.
+ # defaults. On its own, this rule can account for much of the typical Rails URL behavior.
#  
# Although a convenience, defaults can occasionally get in your way. In some cases a default persists longer than desired.
# The default may be cleared by adding <tt>:name => nil</tt> to <tt>url_for</tt>'s options.
View
2  actionpack/lib/action_controller/layout.rb
@@ -70,7 +70,7 @@ class << self
# no layout explicitly assigned with the +layout+ method. Nested controllers use the same folder structure for automatic layout.
# assignment. So an Admin::WeblogController will look for a template named <tt>app/views/layouts/admin/weblog.erb</tt>.
# Setting a layout explicitly will always override the automatic behaviour for the controller where the layout is set.
- # Explicitly setting the layout in a parent class, though, will not override the child class's layout assignement if the child
+ # Explicitly setting the layout in a parent class, though, will not override the child class's layout assignment if the child
# class has a layout with the same name.
#
# == Inheritance for layouts
View
2  actionpack/lib/action_controller/rescue.rb
@@ -227,7 +227,7 @@ def handler_for_rescue(exception)
# assume they should exist at this point. An early raised exception
# could trigger some other handler and the array could include
# precisely a string whose corresponding constant has not yet been
- # seen. This is why we are tolerant to unkown constants.
+ # seen. This is why we are tolerant to unknown constants.
#
# Note that this tolerance only matters if the exception was given as
# a string, otherwise a NameError will be raised by the interpreter
View
2  actionpack/lib/action_controller/routing_optimisation.rb
@@ -8,7 +8,7 @@ module Routing
# :requirements, we can just build up a string and return it.
#
# To support building optimisations for other common cases, the
- # generation code is seperated into several classes
+ # generation code is separated into several classes
module Optimisation
def generate_optimisation_block(route, kind)
return "" unless route.optimise?
View
2  actionpack/lib/action_view/helpers/asset_tag_helper.rb
@@ -356,7 +356,7 @@ def image_path(source)
#
# ==== Options
# You can add HTML attributes using the +options+. The +options+ supports
- # three additional keys for convienence and conformance:
+ # three additional keys for convenience and conformance:
#
# * <tt>:alt</tt> - If no alt text is given, the file name part of the
# +source+ is used (capitalized and without the extension)
View
8 actionpack/lib/action_view/helpers/date_helper.rb
@@ -213,7 +213,7 @@ def datetime_select(object_name, method, options = {})
# Returns a set of html select-tags (one for year, month, day, hour, and minute) pre-selected with the +datetime+.
# 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 the desired order. If you do not supply a Symbol, it
- # will be appened onto the <tt>:order</tt> passed in. You can also add <tt>:date_separator</tt> and <tt>:time_separator</tt>
+ # will be appended onto the <tt>:order</tt> passed in. You can also add <tt>:date_separator</tt> and <tt>:time_separator</tt>
# keys to the +options+ to control visual display of the elements.
#
# ==== Examples
@@ -226,7 +226,7 @@ def datetime_select(object_name, method, options = {})
# select_datetime()
#
# # Generates a datetime select that defaults to the datetime in my_date_time (four days after today)
- # # with the fields ordered year, month, day rather then month, day, year.
+ # # with the fields ordered year, month, day rather than month, day, year.
# select_datetime(my_date_time, :order => [:year, :month, :day])
#
# # Generates a datetime select that defaults to the datetime in my_date_time (four days after today)
@@ -249,7 +249,7 @@ def select_datetime(datetime = Time.now, options = {})
# Returns a set of html select-tags (one for year, month, and day) pre-selected with the +date+.
# It's 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 the desired order. If you do not supply a Symbol, it
- # will be appened onto the <tt>:order</tt> passed in.
+ # will be appended onto the <tt>:order</tt> passed in.
#
# ==== Examples
# my_date = Time.today + 6.days
@@ -261,7 +261,7 @@ def select_datetime(datetime = Time.now, options = {})
# select_date()
#
# # Generates a date select that defaults to the date in my_date (six days after today)
- # # with the fields ordered year, month, day rather then month, day, year.
+ # # with the fields ordered year, month, day rather than month, day, year.
# select_date(my_date, :order => [:year, :month, :day])
#
# # Generates a date select that discards the type of the field and defaults to the date in
View
2  actionpack/lib/action_view/helpers/number_helper.rb
@@ -21,7 +21,7 @@ module NumberHelper
# number_to_phone(1235551234, :area_code => true, :extension => 555) # => (123) 555-1234 x 555
# number_to_phone(1235551234, :country_code => 1) # => +1-123-555-1234
#
- # number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimeter => ".")
+ # number_to_phone(1235551234, :country_code => 1, :extension => 1343, :delimiter => ".")
# => +1.123.555.1234 x 1343
def number_to_phone(number, options = {})
number = number.to_s.strip unless number.nil?
View
2  actionpack/lib/action_view/helpers/url_helper.rb
@@ -331,7 +331,7 @@ def link_to_if(condition, name, options = {}, html_options = {}, &block)
# also used as the name of the link unless +name+ is specified. Additional
# HTML attributes for the link can be passed in +html_options+.
#
- # mail_to has several methods for hindering email harvestors and customizing
+ # mail_to has several methods for hindering email harvesters and customizing
# the email itself by passing special keys to +html_options+.
#
# ==== Options
View
4 actionpack/test/controller/routing_test.rb
@@ -882,14 +882,14 @@ def test_regexp_chunk_should_return_string
end
def test_build_pattern_non_optional_with_no_captures
- # Non optioanl
+ # Non optional
a_segment = ROUTING::DynamicSegment.new
a_segment.regexp = /\d+/ #number_of_captures is 0
assert_equal "(\\d+)stuff", a_segment.build_pattern('stuff')
end
def test_build_pattern_non_optional_with_captures
- # Non optioanl
+ # Non optional
a_segment = ROUTING::DynamicSegment.new
a_segment.regexp = /(\d+)(.*?)/ #number_of_captures is 2
assert_equal "((\\d+)(.*?))stuff", a_segment.build_pattern('stuff')
View
4 actionpack/test/controller/selector_test.rb
@@ -85,11 +85,11 @@ def test_attribute
assert_equal 2, @matches.size
assert_equal "2", @matches[0].attributes["id"]
assert_equal "3", @matches[1].attributes["id"]
- # Match alement with attribute value.
+ # Match element with attribute value.
select("*[title=foo]")
assert_equal 1, @matches.size
assert_equal "3", @matches[0].attributes["id"]
- # Match alement with attribute and attribute value.
+ # Match element with attribute and attribute value.
select("[bar=foo][title]")
assert_equal 1, @matches.size
assert_equal "2", @matches[0].attributes["id"]
View
2  actionpack/test/controller/test_test.rb
@@ -214,7 +214,7 @@ def test_assert_tag_ancestor
def test_assert_tag_descendant
process :test_html_output
- # there is a tag with a decendant 'li' tag
+ # there is a tag with a descendant 'li' tag
assert_tag :descendant => { :tag => "li" }
# there is no tag with a descendant 'html' tag
assert_no_tag :descendant => { :tag => "html" }
View
2  activerecord/lib/active_record/aggregations.rb
@@ -123,7 +123,7 @@ module ClassMethods
# This defaults to +false+.
#
# An optional block can be passed to convert the argument that is passed to the writer method into an instance of
- # <tt>:class_name</tt>. The block will only be called if the arguement is not already an instance of <tt>:class_name</tt>.
+ # <tt>:class_name</tt>. The block will only be called if the argument is not already an instance of <tt>:class_name</tt>.
#
# Option examples:
# composed_of :temperature, :mapping => %w(reading celsius)
View
2  activerecord/lib/active_record/associations.rb
@@ -266,7 +266,7 @@ def clear_association_cache #:nodoc:
#
# === Association callbacks
#
- # Similiar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get
+ # Similar to the normal callbacks that hook into the lifecycle of an Active Record object, you can also define callbacks that get
# triggered when you add an object to or remove an object from an association collection. Example:
#
# class Project
View
2  activerecord/lib/active_record/associations/has_many_through_association.rb
@@ -120,7 +120,7 @@ def sum(*args, &block)
def count(*args)
column_name, options = @reflection.klass.send(:construct_count_options_from_args, *args)
if @reflection.options[:uniq]
- # This is needed becase 'SELECT count(DISTINCT *)..' is not valid sql statement.
+ # This is needed because 'SELECT count(DISTINCT *)..' is not valid sql statement.
column_name = "#{@reflection.klass.table_name}.#{@reflection.klass.primary_key}" if column_name == :all
options.merge!(:distinct => true)
end
View
2  activerecord/lib/active_record/attribute_methods.rb
@@ -79,7 +79,7 @@ def define_attribute_methods
end
end
- # Check to see if the method is defined in the model or any of it's subclasses that also derive from ActiveRecord.
+ # Check to see if the method is defined in the model or any of its subclasses that also derive from ActiveRecord.
# Raise DangerousAttributeError if the method is defined by ActiveRecord though.
def instance_method_already_implemented?(method_name)
return true if method_name =~ /^id(=$|\?$|$)/
View
2  activerecord/lib/active_record/callbacks.rb
@@ -164,7 +164,7 @@ module ActiveRecord
# If <tt>Base#save!</tt> is called it will raise a +RecordNotSaved+ exception.
# Nothing will be appended to the errors object.
#
- # == Cancelling callbacks
+ # == Canceling callbacks
#
# If a <tt>before_*</tt> callback returns +false+, all the later callbacks and the associated action are cancelled. If an <tt>after_*</tt> callback returns
# +false+, all the later callbacks are cancelled. Callbacks are generally run in the order they are defined, with the exception of callbacks
View
2  activerecord/test/validations_test.rb
@@ -367,7 +367,7 @@ def test_validate_uniqueness_scoped_to_defining_class
assert !r2.valid?, "Saving r2"
# Should succeed as validates_uniqueness_of only applies to
- # UniqueReply and it's subclasses
+ # UniqueReply and its subclasses
r3 = t.replies.create "title" => "r2", "content" => "a barrel of fun"
assert r3.valid?, "Saving r3"
end
View
2  activesupport/lib/active_support/core_ext/array/conversions.rb
@@ -4,7 +4,7 @@ module ActiveSupport #:nodoc:
module CoreExtensions #:nodoc:
module Array #:nodoc:
module Conversions
- # Converts the array to comma-seperated sentence where the last element is joined by the connector word. Options:
+ # Converts the array to a comma-separated sentence where the last element is joined by the connector word. Options:
# * <tt>:connector</tt> - The word used to join the last element in arrays with two or more elements (default: "and")
# * <tt>:skip_last_comma</tt> - Set to true to return "a, b and c" instead of "a, b, and c".
def to_sentence(options = {})
View
2  activesupport/test/multibyte_handler_test.rb
@@ -69,7 +69,7 @@ def test_simple_normalization
assert_raise(ActiveSupport::Multibyte::Handlers::EncodingError) { @handler.normalize(@bytestring) }
end
- # Test for the Public Review Issue #29, bad explaination of composition might lead to a
+ # Test for the Public Review Issue #29, bad explanation of composition might lead to a
# bad implementation: http://www.unicode.org/review/pr-29.html
def test_normalization_C_pri_29
[
View
4 railties/lib/initializer.rb
@@ -176,7 +176,7 @@ def add_plugin_load_paths
#
# In the default implementation, as each plugin discovered in <tt>plugin_paths</tt> is initialized:
# * its +lib+ directory, if present, is added to the load path (immediately after the applications lib directory)
- # * <tt>init.rb</tt> is evalutated, if present
+ # * <tt>init.rb</tt> is evaluated, if present
#
# After all plugins are loaded, duplicates are removed from the load path.
# If an array of plugin names is specified in config.plugins, only those plugins will be loaded
@@ -217,7 +217,7 @@ def load_observers
end
end
- # This initialzation sets $KCODE to 'u' to enable the multibyte safe operations.
+ # This initialization sets $KCODE to 'u' to enable the multibyte safe operations.
# Plugin authors supporting other encodings should override this behaviour and
# set the relevant +default_charset+ on ActionController::Base
def initialize_encoding
View
2  railties/lib/rails/plugin/loader.rb
@@ -10,7 +10,7 @@ class Loader
# all plugins, and adds all plugin load paths, when it is created. The plugins
# are then fully loaded (init.rb is evaluated) when load_plugins is called.
#
- # It is the loader's responsibilty to ensure that only the plugins specified
+ # It is the loader's responsibility to ensure that only the plugins specified
# in the configuration are actually loaded, and that the order defined
# is respected.
def initialize(initializer)
View
2  railties/test/generators/generator_test_helper.rb
@@ -1,5 +1,5 @@
module GeneratorTestHelper
- # Instatiates the Generator
+ # Instantiates the Generator
def build_generator(name,params)
Rails::Generator::Base.instance(name,params)
end
Please sign in to comment.
Something went wrong with that request. Please try again.