提交 4f234bfd 编写于 作者: L Lee Reilly

Corrected some typos and American vs. Queen's English issues

上级 18b153d1
......@@ -60,11 +60,11 @@ def assert_redirected_to(options = {}, message=nil)
assert_response(:redirect, message)
return true if options == @response.location
redirected_to_after_normalisation = normalize_argument_to_redirection(@response.location)
options_after_normalisation = normalize_argument_to_redirection(options)
redirected_to_after_normalization = normalize_argument_to_redirection(@response.location)
options_after_normalization = normalize_argument_to_redirection(options)
if redirected_to_after_normalisation != options_after_normalisation
flunk "Expected response to be a redirect to <#{options_after_normalisation}> but was a redirect to <#{redirected_to_after_normalisation}>"
if redirected_to_after_normalization != options_after_normalization
flunk "Expected response to be a redirect to <#{options_after_normalization}> but was a redirect to <#{redirected_to_after_normalization}>"
end
end
......
......@@ -40,7 +40,7 @@ module Submodule
class ContainedEmptyController < ActionController::Base ; end
class ContainedSubEmptyController < ContainedEmptyController ; end
class ContainedNonDefaultPathController < ActionController::Base
def self.controller_path; "i_am_extremly_not_default"; end
def self.controller_path; "i_am_extremely_not_default"; end
end
end
......@@ -89,7 +89,7 @@ class BaseTest < Rack::TestCase
end
test "namespaced non-default controller path" do
assert_equal 'i_am_extremly_not_default', Submodule::ContainedNonDefaultPathController.controller_path
assert_equal 'i_am_extremely_not_default', Submodule::ContainedNonDefaultPathController.controller_path
assert_equal Submodule::ContainedNonDefaultPathController.controller_path, Submodule::ContainedNonDefaultPathController.new.controller_path
end
......
......@@ -860,7 +860,7 @@ def association_instance_set(name, association)
# the inverse of each other and the inverse of the +dungeon+ association on +EvilWizard+
# is the +evil_wizard+ association on +Dungeon+ (and vice-versa). By default,
# Active Record doesn't know anything about these inverse relationships and so no object
# loading optimisation is possible. For example:
# loading optimization is possible. For example:
#
# d = Dungeon.first
# t = d.traps.first
......
......@@ -17,7 +17,7 @@ module ClassMethods
# posts.each {|p| puts p.name } # Fires "select * from posts" and loads post objects
#
# fruits = Fruit.scoped
# fruits = fruits.where(:colour => 'red') if options[:red_only]
# fruits = fruits.where(:color => 'red') if options[:red_only]
# fruits = fruits.limit(10) if limited?
#
# Anonymous \scopes tend to be useful when procedurally generating complex
......
......@@ -106,7 +106,7 @@ def table(table, stream)
spec = {}
spec[:name] = column.name.inspect
# AR has an optimisation which handles zero-scale decimals as integers. This
# AR has an optimization which handles zero-scale decimals as integers. This
# code ensures that the dumper still dumps the column as a decimal.
spec[:type] = if column.type == :integer && [/^numeric/, /^decimal/].any? { |e| e.match(column.sql_type) }
'decimal'
......
......@@ -283,7 +283,7 @@ class << self
# attribute 'name', :string
#
# # or use the convenience methods and pass >=1 attribute names
# string 'eye_colour', 'hair_colour'
# string 'eye_color', 'hair_color'
# integer 'age'
# float 'height', 'weight'
#
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册