提交 238e6f0c 编写于 作者: R R.T. Lechow

Active Record typos.

上级 80e3beb2
......@@ -7,7 +7,7 @@ module Associations
# This is the root class of all associations ('+ Foo' signifies an included module Foo):
#
# Association
# SingularAssociaton
# SingularAssociation
# HasOneAssociation
# HasOneThroughAssociation + ThroughAssociation
# BelongsToAssociation
......@@ -88,7 +88,7 @@ def scoped
# Construct the scope for this association.
#
# Note that the association_scope is merged into the targed_scope only when the
# Note that the association_scope is merged into the target_scope only when the
# scoped method is called. This is because at that point the call may be surrounded
# by scope.scoping { ... } or with_scope { ... } etc, which affects the scope which
# actually gets built.
......
......@@ -4,7 +4,7 @@ module ActiveRecord
# = Active Record Autosave Association
#
# +AutosaveAssociation+ is a module that takes care of automatically saving
# associacted records when their parent is saved. In addition to saving, it
# associated records when their parent is saved. In addition to saving, it
# also destroys any associated records that were marked for destruction.
# (See +mark_for_destruction+ and <tt>marked_for_destruction?</tt>).
#
......
......@@ -73,7 +73,7 @@ module ActiveRecord
#
# Now, when <tt>Topic#destroy</tt> is run only +destroy_author+ is called. When <tt>Reply#destroy</tt> is
# run, both +destroy_author+ and +destroy_readers+ are called. Contrast this to the following situation
# where the +before_destroy+ methis is overriden:
# where the +before_destroy+ method is overridden:
#
# class Topic < ActiveRecord::Base
# def before_destroy() destroy_author end
......
......@@ -831,12 +831,12 @@ def test_dup_of_saved_object_marks_attributes_as_dirty
def test_dup_of_saved_object_marks_as_dirty_only_changed_attributes
developer = Developer.create! :name => 'Bjorn'
assert !developer.name_changed? # both attributes of saved object should be threated as not changed
assert !developer.name_changed? # both attributes of saved object should be treated as not changed
assert !developer.salary_changed?
cloned_developer = developer.dup
assert cloned_developer.name_changed? # ... but on cloned object should be
assert !cloned_developer.salary_changed? # ... BUT salary has non-nil default which should be threated as not changed on cloned instance
assert !cloned_developer.salary_changed? # ... BUT salary has non-nil default which should be treated as not changed on cloned instance
end
def test_bignum
......
......@@ -295,7 +295,7 @@ def test_eager_loading_with_conditions_on_string_joined_table_preloads
end
##############################################################################
# Behaviour releated to saving failures
# Behaviour related to saving failures
##############################################################################
def test_reload_object_if_save_failed
......@@ -338,7 +338,7 @@ def test_reload_object_if_update_attributes_fails
end
##############################################################################
# Behaviour of readonly, forzen, destroyed
# Behaviour of readonly, frozen, destroyed
##############################################################################
def test_find_using_identity_map_respects_readonly_when_loading_associated_object_first
......
......@@ -543,7 +543,7 @@ def test_native_types
assert_equal "I was born ....", bob.bio
assert_equal 18, bob.age
# Test for 30 significent digits (beyond the 16 of float), 10 of them
# Test for 30 significant digits (beyond the 16 of float), 10 of them
# after the decimal place.
unless current_adapter?(:SQLite3Adapter)
......@@ -1975,7 +1975,7 @@ def test_adding_indexes
t.integer :age
end
# Adding an index fires a query everytime to check if an index already exists or not
# Adding an index fires a query every time to check if an index already exists or not
assert_queries(3) do
with_bulk_change_table do |t|
t.index :username, :unique => true, :name => :awesome_username_index
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册