Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
cec03439
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 搜索 >>
提交
cec03439
编写于
3月 28, 2013
作者:
A
Alexander Balashov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix typo: overriden => overriDDen
上级
5533994b
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
5 deletion
+5
-5
activerecord/lib/active_record/core.rb
activerecord/lib/active_record/core.rb
+2
-2
activerecord/test/cases/base_test.rb
activerecord/test/cases/base_test.rb
+1
-1
activerecord/test/cases/dup_test.rb
activerecord/test/cases/dup_test.rb
+1
-1
activerecord/test/cases/relation_scoping_test.rb
activerecord/test/cases/relation_scoping_test.rb
+1
-1
未找到文件。
activerecord/lib/active_record/core.rb
浏览文件 @
cec03439
...
...
@@ -78,7 +78,7 @@ module Core
self
.
disable_implicit_join_references
=
false
class_attribute
:default_connection_handler
,
instance_writer:
false
def
self
.
connection_handler
Thread
.
current
[
:active_record_connection_handler
]
||
self
.
default_connection_handler
end
...
...
@@ -444,7 +444,7 @@ def init_internals
end
def
init_changed_attributes
# Intentionally avoid using #column_defaults since overriden defaults (as is done in
# Intentionally avoid using #column_defaults since overrid
d
en defaults (as is done in
# optimistic locking) won't get written unless they get marked as changed
self
.
class
.
columns
.
each
do
|
c
|
attr
,
orig_value
=
c
.
name
,
c
.
default
...
...
activerecord/test/cases/base_test.rb
浏览文件 @
cec03439
...
...
@@ -1579,7 +1579,7 @@ def test_default_values_are_deeply_dupped
assert_equal
[
'foo'
],
klass
.
all
.
merge!
(
select:
'foo'
).
select_values
end
test
"connection_handler can be overriden"
do
test
"connection_handler can be overrid
d
en"
do
klass
=
Class
.
new
(
ActiveRecord
::
Base
)
orig_handler
=
klass
.
connection_handler
new_handler
=
ActiveRecord
::
ConnectionAdapters
::
ConnectionHandler
.
new
...
...
activerecord/test/cases/dup_test.rb
浏览文件 @
cec03439
...
...
@@ -128,7 +128,7 @@ def test_dup_with_default_scope
prev_default_scopes
=
Topic
.
default_scopes
Topic
.
default_scopes
=
[
Topic
.
where
(
:approved
=>
true
)]
topic
=
Topic
.
new
(
:approved
=>
false
)
assert
!
topic
.
dup
.
approved?
,
"should not be overriden by default scopes"
assert
!
topic
.
dup
.
approved?
,
"should not be overrid
d
en by default scopes"
ensure
Topic
.
default_scopes
=
prev_default_scopes
end
...
...
activerecord/test/cases/relation_scoping_test.rb
浏览文件 @
cec03439
...
...
@@ -293,7 +293,7 @@ def test_should_maintain_default_scope_on_associations
assert_equal
[
magician
],
people
(
:michael
).
bad_references
end
def
test_should_default_scope_on_associations_is_overriden_by_association_conditions
def
test_should_default_scope_on_associations_is_overrid
d
en_by_association_conditions
reference
=
references
(
:michael_unicyclist
).
becomes
(
BadReference
)
assert_equal
[
reference
],
people
(
:michael
).
fixed_bad_references
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录