Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
238e6f0c
R
rails
项目概览
张重言
/
rails
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
rails
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
238e6f0c
编写于
3月 03, 2011
作者:
R
R.T. Lechow
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Active Record typos.
上级
80e3beb2
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
10 addition
and
10 deletion
+10
-10
activerecord/lib/active_record/associations/association.rb
activerecord/lib/active_record/associations/association.rb
+2
-2
activerecord/lib/active_record/autosave_association.rb
activerecord/lib/active_record/autosave_association.rb
+1
-1
activerecord/lib/active_record/callbacks.rb
activerecord/lib/active_record/callbacks.rb
+1
-1
activerecord/test/cases/base_test.rb
activerecord/test/cases/base_test.rb
+2
-2
activerecord/test/cases/identity_map_test.rb
activerecord/test/cases/identity_map_test.rb
+2
-2
activerecord/test/cases/migration_test.rb
activerecord/test/cases/migration_test.rb
+2
-2
未找到文件。
activerecord/lib/active_record/associations/association.rb
浏览文件 @
238e6f0c
...
...
@@ -7,7 +7,7 @@ module Associations
# This is the root class of all associations ('+ Foo' signifies an included module Foo):
#
# Association
# SingularAssociaton
# SingularAssociat
i
on
# 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 targe
d
_scope only when the
# Note that the association_scope is merged into the targe
t
_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.
...
...
activerecord/lib/active_record/autosave_association.rb
浏览文件 @
238e6f0c
...
...
@@ -4,7 +4,7 @@ module ActiveRecord
# = Active Record Autosave Association
#
# +AutosaveAssociation+ is a module that takes care of automatically saving
# associa
c
ted 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>).
#
...
...
activerecord/lib/active_record/callbacks.rb
浏览文件 @
238e6f0c
...
...
@@ -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+ meth
is is overri
den:
# where the +before_destroy+ meth
od is overrid
den:
#
# class Topic < ActiveRecord::Base
# def before_destroy() destroy_author end
...
...
activerecord/test/cases/base_test.rb
浏览文件 @
238e6f0c
...
...
@@ -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 t
h
reated 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 t
h
reated 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
...
...
activerecord/test/cases/identity_map_test.rb
浏览文件 @
238e6f0c
...
...
@@ -295,7 +295,7 @@ def test_eager_loading_with_conditions_on_string_joined_table_preloads
end
##############################################################################
# Behaviour rel
e
ated 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, f
or
zen, destroyed
# Behaviour of readonly, f
ro
zen, destroyed
##############################################################################
def
test_find_using_identity_map_respects_readonly_when_loading_associated_object_first
...
...
activerecord/test/cases/migration_test.rb
浏览文件 @
238e6f0c
...
...
@@ -543,7 +543,7 @@ def test_native_types
assert_equal
"I was born ...."
,
bob
.
bio
assert_equal
18
,
bob
.
age
# Test for 30 signific
e
nt digits (beyond the 16 of float), 10 of them
# Test for 30 signific
a
nt 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.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录