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
# 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!
[Base, Request, Response, UrlRewriter, UrlWriter]
[ActionDispatch::Http::Headers]

View file

@ -330,7 +330,7 @@ module ActionController #:nodoc:
cattr_accessor :use_accept_header
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
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
# 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)
t = time.to_i
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>: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
# provided either explicitly, or via +default_url_options+.
# * <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)
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)

View file

@ -56,7 +56,7 @@ module ActionController
#
# ActionController::TestCase will automatically infer the controller under 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
# tests WidgetController
@ -195,7 +195,7 @@ module ActionController
@controller.send(:initialize_current_url)
end
end
# Cause the action to be rescued according to the regular rules for rescue_action when the visitor is not local
def rescue_action_in_public!
@request.remote_addr = '208.77.188.166' # example.com

View file

@ -246,7 +246,7 @@ module ActionView
# <tt>labelling_form</tt>.
#
# 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
# could do something like the following:
@ -620,8 +620,8 @@ module ActionView
# Returns a checkbox tag tailored for accessing a specified attribute (identified by +method+) on an object
# assigned to the template (identified by +object+). This object must be an instance object (@object) and not a local object.
# It's intended that +method+ returns an integer and if that integer is above zero, then the checkbox is checked.
# Additional options on the input tag can be passed as a hash with +options+. The +checked_value+ defaults to 1
# It's intended that +method+ returns an integer and if that integer is above zero, then the checkbox is checked.
# Additional options on the input tag can be passed as a hash with +options+. The +checked_value+ defaults to 1
# while the default +unchecked_value+ is set to 0 which is convenient for boolean values.
#
# ==== Gotcha
@ -1043,4 +1043,4 @@ module ActionView
cattr_accessor :default_form_builder
self.default_form_builder = ::ActionView::Helpers::FormBuilder
end
end
end

View file

@ -431,7 +431,7 @@ module ActionView
end
# 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.
#
# ==== Example
@ -539,7 +539,7 @@ module ActionView
left, right = $`, $'
# detect already linked URLs and URLs in the middle of a tag
if left =~ /<[^>]+$/ && right =~ /^[^>]*>/
# do not change string; URL is alreay linked
# do not change string; URL is already linked
href
else
# 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
# 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
# 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
# create an HTML form and immediately submit the form for processing using
# the HTTP verb specified. Useful for having links perform a POST operation

View file

@ -23,7 +23,7 @@ module ActionView
private
# 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.
def find_templates(name, details, prefix, partial)
raise NotImplementedError
@ -149,4 +149,4 @@ module ActionView
end
end
end
end

View file

@ -12,7 +12,7 @@ class Array
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])
# 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)
::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

View file

@ -1,5 +1,5 @@
# 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.
if RUBY_VERSION < '1.9'
class Time

View file

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

View file

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

View file

@ -53,7 +53,7 @@ module ActiveSupport
memo[name] = child_hash
end
# Recusively walk children
# Recursively walk children
child.children.each { |c|
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
#
# hash::
# Hash to add the converted emement to.
# Hash to add the converted element to.
# element::
# XML element whose texts are to me merged into the hash
def merge_texts!(hash, element)