Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
55686dd1
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(gitcode.net)2024年7月9日维护升级公告
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
55686dd1
编写于
3月 19, 2013
作者:
V
Vipul A M
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix typos in AR. lots of them.
上级
4e7292c0
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
10 addition
and
10 deletion
+10
-10
activerecord/lib/active_record/attribute_methods.rb
activerecord/lib/active_record/attribute_methods.rb
+1
-1
activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb
...ve_record/connection_adapters/abstract/database_limits.rb
+1
-1
activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
...active_record/connection_adapters/abstract/transaction.rb
+1
-1
activerecord/lib/active_record/explain.rb
activerecord/lib/active_record/explain.rb
+1
-1
activerecord/test/cases/associations/eager_test.rb
activerecord/test/cases/associations/eager_test.rb
+1
-1
activerecord/test/cases/attribute_methods_test.rb
activerecord/test/cases/attribute_methods_test.rb
+2
-2
activerecord/test/cases/batches_test.rb
activerecord/test/cases/batches_test.rb
+1
-1
activerecord/test/cases/dup_test.rb
activerecord/test/cases/dup_test.rb
+1
-1
activerecord/test/cases/nested_attributes_test.rb
activerecord/test/cases/nested_attributes_test.rb
+1
-1
未找到文件。
activerecord/lib/active_record/attribute_methods.rb
浏览文件 @
55686dd1
...
...
@@ -21,7 +21,7 @@ module ClassMethods
# Generates all the attribute related methods for columns in the database
# accessors, mutators and query methods.
def
define_attribute_methods
# :nodoc:
# Use a mutex; we don't want two thread sim
a
ltaneously trying to define
# Use a mutex; we don't want two thread sim
u
ltaneously trying to define
# attribute methods.
@attribute_methods_mutex
.
synchronize
do
return
if
attribute_methods_generated?
...
...
activerecord/lib/active_record/connection_adapters/abstract/database_limits.rb
浏览文件 @
55686dd1
...
...
@@ -21,7 +21,7 @@ def table_name_length
# limit is enforced by rails and Is less than or equal to
# <tt>index_name_length</tt>. The gap between
# <tt>index_name_length</tt> is to allow internal rails
# op
reations to use prefixes in temporary opre
ations.
# op
erations to use prefixes in temporary oper
ations.
def
allowed_index_name_length
index_name_length
end
...
...
activerecord/lib/active_record/connection_adapters/abstract/transaction.rb
浏览文件 @
55686dd1
...
...
@@ -78,7 +78,7 @@ def initialize(connection, parent, options = {})
@joinable
=
options
.
fetch
(
:joinable
,
true
)
end
# This state is neces
ar
ry so that we correctly handle stuff that might
# This state is neces
sa
ry so that we correctly handle stuff that might
# happen in a commit/rollback. But it's kinda distasteful. Maybe we can
# find a better way to structure it in the future.
def
finishing?
...
...
activerecord/lib/active_record/explain.rb
浏览文件 @
55686dd1
...
...
@@ -9,7 +9,7 @@ def collecting_queries_for_explain # :nodoc:
yield
return
current
[
:available_queries_for_explain
]
ensure
# Note that the return value above does not depend on this assigment.
# Note that the return value above does not depend on this assig
n
ment.
current
[
:available_queries_for_explain
]
=
original
end
...
...
activerecord/test/cases/associations/eager_test.rb
浏览文件 @
55686dd1
...
...
@@ -193,7 +193,7 @@ def test_finding_with_includes_on_has_many_association_with_same_include_include
end
end
def
test_finding_with_includes_on_has_one_assocation_with_same_include_includes_only_once
def
test_finding_with_includes_on_has_one_assoc
i
ation_with_same_include_includes_only_once
author
=
authors
(
:david
)
post
=
author
.
post_about_thinking_with_last_comment
last_comment
=
post
.
last_comment
...
...
activerecord/test/cases/attribute_methods_test.rb
浏览文件 @
55686dd1
...
...
@@ -159,8 +159,8 @@ def test_array_content
end
def
test_read_attributes_before_type_cast
category
=
Category
.
new
({
:name
=>
"Test catego
t
y"
,
:type
=>
nil
})
category_attrs
=
{
"name"
=>
"Test catego
t
y"
,
"id"
=>
nil
,
"type"
=>
nil
,
"categorizations_count"
=>
nil
}
category
=
Category
.
new
({
:name
=>
"Test catego
r
y"
,
:type
=>
nil
})
category_attrs
=
{
"name"
=>
"Test catego
r
y"
,
"id"
=>
nil
,
"type"
=>
nil
,
"categorizations_count"
=>
nil
}
assert_equal
category_attrs
,
category
.
attributes_before_type_cast
end
...
...
activerecord/test/cases/batches_test.rb
浏览文件 @
55686dd1
...
...
@@ -11,7 +11,7 @@ def setup
Post
.
count
(
'id'
)
# preheat arel's table cache
end
def
test_each_should_ex
c
ecute_one_query_per_batch
def
test_each_should_execute_one_query_per_batch
assert_queries
(
Post
.
count
+
1
)
do
Post
.
find_each
(
:batch_size
=>
1
)
do
|
post
|
assert_kind_of
Post
,
post
...
...
activerecord/test/cases/dup_test.rb
浏览文件 @
55686dd1
...
...
@@ -110,7 +110,7 @@ def test_dup_after_initialize_callbacks
def
test_dup_validity_is_independent
repair_validations
(
Topic
)
do
Topic
.
validates_presence_of
:title
topic
=
Topic
.
new
(
"title"
=>
"Lit
t
erature"
)
topic
=
Topic
.
new
(
"title"
=>
"Literature"
)
topic
.
valid?
duped
=
topic
.
dup
...
...
activerecord/test/cases/nested_attributes_test.rb
浏览文件 @
55686dd1
...
...
@@ -167,7 +167,7 @@ def test_reject_if_with_blank_nested_attributes_id
def
test_first_and_array_index_zero_methods_return_the_same_value_when_nested_attributes_are_set_to_update_existing_record
Man
.
accepts_nested_attributes_for
(
:interests
)
man
=
Man
.
create
(
:name
=>
"John"
)
interest
=
man
.
interests
.
create
:topic
=>
'gardning'
interest
=
man
.
interests
.
create
:topic
=>
'gard
e
ning'
man
=
Man
.
find
man
.
id
man
.
interests_attributes
=
[{
:id
=>
interest
.
id
,
:topic
=>
'gardening'
}]
assert_equal
man
.
interests
.
first
.
topic
,
man
.
interests
[
0
].
topic
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录