1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Some spelling changes.

This commit is contained in:
Evan Farrar 2009-05-07 12:35:38 -05:00
parent 1135e29bab
commit a97f3bdfa9
16 changed files with 24 additions and 24 deletions

View file

@ -36,7 +36,7 @@ require File.join(File.dirname(__FILE__), "action_pack")
module ActionController module ActionController
# TODO: Review explicit to see if they will automatically be handled by # TODO: Review explicit to see if they will automatically be handled by
# the initilizer if they are really needed. # the initializer if they are really needed.
def self.load_all! def self.load_all!
[Base, Request, Response, UrlRewriter, UrlWriter] [Base, Request, Response, UrlRewriter, UrlWriter]
[ActionDispatch::Http::Headers] [ActionDispatch::Http::Headers]

View file

@ -330,7 +330,7 @@ module ActionController #:nodoc:
cattr_accessor :use_accept_header cattr_accessor :use_accept_header
self.use_accept_header = true self.use_accept_header = true
# Controls whether request forgergy protection is turned on or not. Turned off by default only in test mode. # Controls whether request forgery protection is turned on or not. Turned off by default only in test mode.
class_inheritable_accessor :allow_forgery_protection class_inheritable_accessor :allow_forgery_protection
self.allow_forgery_protection = true self.allow_forgery_protection = true

View file

@ -271,7 +271,7 @@ module ActionController
# #
# The nonce is opaque to the client. Composed of Time, and hash of Time with secret # The nonce is opaque to the client. Composed of Time, and hash of Time with secret
# key from the Rails session secret generated upon creation of project. Ensures # key from the Rails session secret generated upon creation of project. Ensures
# the time cannot be modifed by client. # the time cannot be modified by client.
def nonce(time = Time.now) def nonce(time = Time.now)
t = time.to_i t = time.to_i
hashed = [t, secret_key] hashed = [t, secret_key]

View file

@ -93,7 +93,7 @@ module ActionController
# #
# * <tt>:only_path</tt> - If true, the relative url is returned. Defaults to +false+. # * <tt>:only_path</tt> - If true, the relative url is returned. Defaults to +false+.
# * <tt>:protocol</tt> - The protocol to connect to. Defaults to 'http'. # * <tt>:protocol</tt> - The protocol to connect to. Defaults to 'http'.
# * <tt>:host</tt> - Specifies the host the link should be targetted at. # * <tt>:host</tt> - Specifies the host the link should be targeted at.
# If <tt>:only_path</tt> is false, this option must be # If <tt>:only_path</tt> is false, this option must be
# provided either explicitly, or via +default_url_options+. # provided either explicitly, or via +default_url_options+.
# * <tt>:port</tt> - Optionally specify the port to connect to. # * <tt>:port</tt> - Optionally specify the port to connect to.

View file

@ -155,7 +155,7 @@ module ActionController
def define_url_helper(route, name, kind, options) def define_url_helper(route, name, kind, options)
selector = url_helper_name(name, kind) selector = url_helper_name(name, kind)
# The segment keys used for positional paramters # The segment keys used for positional parameters
hash_access_method = hash_access_name(name, kind) hash_access_method = hash_access_name(name, kind)

View file

@ -56,7 +56,7 @@ module ActionController
# #
# ActionController::TestCase will automatically infer the controller under test # ActionController::TestCase will automatically infer the controller under test
# from the test class name. If the controller cannot be inferred from the test # from the test class name. If the controller cannot be inferred from the test
# class name, you can explicity set it with +tests+. # class name, you can explicitly set it with +tests+.
# #
# class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase # class SpecialEdgeCaseWidgetsControllerTest < ActionController::TestCase
# tests WidgetController # tests WidgetController

View file

@ -246,7 +246,7 @@ module ActionView
# <tt>labelling_form</tt>. # <tt>labelling_form</tt>.
# #
# The custom FormBuilder class is automatically merged with the options # The custom FormBuilder class is automatically merged with the options
# of a nested fields_for call, unless it's explicitely set. # of a nested fields_for call, unless it's explicitly set.
# #
# In many cases you will want to wrap the above in another helper, so you # In many cases you will want to wrap the above in another helper, so you
# could do something like the following: # could do something like the following:

View file

@ -431,7 +431,7 @@ module ActionView
end end
# Returns the current cycle string after a cycle has been started. Useful # Returns the current cycle string after a cycle has been started. Useful
# for complex table highlighing or any other design need which requires # for complex table highlighting or any other design need which requires
# the current cycle string in more than one place. # the current cycle string in more than one place.
# #
# ==== Example # ==== Example
@ -539,7 +539,7 @@ module ActionView
left, right = $`, $' left, right = $`, $'
# detect already linked URLs and URLs in the middle of a tag # detect already linked URLs and URLs in the middle of a tag
if left =~ /<[^>]+$/ && right =~ /^[^>]*>/ if left =~ /<[^>]+$/ && right =~ /^[^>]*>/
# do not change string; URL is alreay linked # do not change string; URL is already linked
href href
else else
# don't include trailing punctuation character as part of the URL # don't include trailing punctuation character as part of the URL

View file

@ -116,7 +116,7 @@ module ActionView
# * <tt>:popup => true || array of window options</tt> - This will force the # * <tt>:popup => true || array of window options</tt> - This will force the
# link to open in a popup window. By passing true, a default browser window # link to open in a popup window. By passing true, a default browser window
# will be opened with the URL. You can also specify an array of options # will be opened with the URL. You can also specify an array of options
# that are passed-thru to JavaScripts window.open method. # that are passed through to JavaScripts window.open method.
# * <tt>:method => symbol of HTTP verb</tt> - This modifier will dynamically # * <tt>:method => symbol of HTTP verb</tt> - This modifier will dynamically
# create an HTML form and immediately submit the form for processing using # create an HTML form and immediately submit the form for processing using
# the HTTP verb specified. Useful for having links perform a POST operation # the HTTP verb specified. Useful for having links perform a POST operation

View file

@ -23,7 +23,7 @@ module ActionView
private private
# This is what child classes implement. No defaults are needed # This is what child classes implement. No defaults are needed
# because Path guarentees that the arguments are present and # because Path guarantees that the arguments are present and
# normalized. # normalized.
def find_templates(name, details, prefix, partial) def find_templates(name, details, prefix, partial)
raise NotImplementedError raise NotImplementedError

View file

@ -12,7 +12,7 @@ class Array
default_two_words_connector = I18n.translate(:'support.array.two_words_connector', :locale => options[:locale]) default_two_words_connector = I18n.translate(:'support.array.two_words_connector', :locale => options[:locale])
default_last_word_connector = I18n.translate(:'support.array.last_word_connector', :locale => options[:locale]) default_last_word_connector = I18n.translate(:'support.array.last_word_connector', :locale => options[:locale])
# Try to emulate to_senteces previous to 2.3 # Try to emulate to_sentences previous to 2.3
if options.has_key?(:connector) || options.has_key?(:skip_last_comma) if options.has_key?(:connector) || options.has_key?(:skip_last_comma)
::ActiveSupport::Deprecation.warn(":connector has been deprecated. Use :words_connector instead", caller) if options.has_key? :connector ::ActiveSupport::Deprecation.warn(":connector has been deprecated. Use :words_connector instead", caller) if options.has_key? :connector
::ActiveSupport::Deprecation.warn(":skip_last_comma has been deprecated. Use :last_word_connector instead", caller) if options.has_key? :skip_last_comma ::ActiveSupport::Deprecation.warn(":skip_last_comma has been deprecated. Use :last_word_connector instead", caller) if options.has_key? :skip_last_comma

View file

@ -1,5 +1,5 @@
# Pre-1.9 versions of Ruby have a bug with marshaling Time instances, where utc instances are # Pre-1.9 versions of Ruby have a bug with marshaling Time instances, where utc instances are
# unmarshaled in the local zone, instead of utc. We're layering behavior on the _dump and _load # unmarshalled in the local zone, instead of utc. We're layering behavior on the _dump and _load
# methods so that utc instances can be flagged on dump, and coerced back to utc on load. # methods so that utc instances can be flagged on dump, and coerced back to utc on load.
if RUBY_VERSION < '1.9' if RUBY_VERSION < '1.9'
class Time class Time

View file

@ -155,7 +155,7 @@ module ActiveSupport
# Examples: # Examples:
# "posts".singularize # => "post" # "posts".singularize # => "post"
# "octopi".singularize # => "octopus" # "octopi".singularize # => "octopus"
# "sheep".singluarize # => "sheep" # "sheep".singularize # => "sheep"
# "word".singularize # => "word" # "word".singularize # => "word"
# "CamelOctopi".singularize # => "CamelOctopus" # "CamelOctopi".singularize # => "CamelOctopus"
def singularize(word) def singularize(word)
@ -261,9 +261,9 @@ module ActiveSupport
# <%= link_to(@person.name, person_path(@person)) %> # <%= link_to(@person.name, person_path(@person)) %>
# # => <a href="/person/1-donald-e-knuth">Donald E. Knuth</a> # # => <a href="/person/1-donald-e-knuth">Donald E. Knuth</a>
def parameterize(string, sep = '-') def parameterize(string, sep = '-')
# replace accented chars with ther ascii equivalents # replace accented chars with their ascii equivalents
parameterized_string = transliterate(string) parameterized_string = transliterate(string)
# Turn unwanted chars into the seperator # Turn unwanted chars into the separator
parameterized_string.gsub!(/[^a-z0-9\-_\+]+/i, sep) parameterized_string.gsub!(/[^a-z0-9\-_\+]+/i, sep)
unless sep.blank? unless sep.blank?
re_sep = Regexp.escape(sep) re_sep = Regexp.escape(sep)

View file

@ -74,7 +74,7 @@ module ActiveSupport
# Merge all the texts of an element into the hash # Merge all the texts of an element into the hash
# #
# hash:: # hash::
# Hash to add the converted emement to. # Hash to add the converted element to.
# element:: # element::
# XML element whose texts are to me merged into the hash # XML element whose texts are to me merged into the hash
def merge_texts!(hash, element) def merge_texts!(hash, element)

View file

@ -53,7 +53,7 @@ module ActiveSupport
memo[name] = child_hash memo[name] = child_hash
end end
# Recusively walk children # Recursively walk children
child.children.each { |c| child.children.each { |c|
callback.call(child_hash, child, c, callback) callback.call(child_hash, child, c, callback)
} }

View file

@ -50,7 +50,7 @@ module ActiveSupport
# Merge all the texts of an element into the hash # Merge all the texts of an element into the hash
# #
# hash:: # hash::
# Hash to add the converted emement to. # Hash to add the converted element to.
# element:: # element::
# XML element whose texts are to me merged into the hash # XML element whose texts are to me merged into the hash
def merge_texts!(hash, element) def merge_texts!(hash, element)