Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
d338a0fe
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,发现更多精彩内容 >>
提交
d338a0fe
编写于
3月 14, 2013
作者:
V
Vipul A M
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MOAR cleanups.
上级
a3c8e4ad
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
5 addition
and
6 deletion
+5
-6
activerecord/lib/active_record/railtie.rb
activerecord/lib/active_record/railtie.rb
+3
-3
activerecord/test/cases/adapters/mysql2/reserved_word_test.rb
...verecord/test/cases/adapters/mysql2/reserved_word_test.rb
+0
-1
activerecord/test/cases/associations_test.rb
activerecord/test/cases/associations_test.rb
+1
-1
activerecord/test/cases/connection_pool_test.rb
activerecord/test/cases/connection_pool_test.rb
+1
-1
未找到文件。
activerecord/lib/active_record/railtie.rb
浏览文件 @
d338a0fe
...
...
@@ -49,7 +49,7 @@ class Railtie < Rails::Railtie # :nodoc:
Rails
.
logger
.
extend
ActiveSupport
::
Logger
.
broadcast
console
end
runner
do
|
app
|
runner
do
require
"active_record/base"
end
...
...
@@ -64,7 +64,7 @@ class Railtie < Rails::Railtie # :nodoc:
ActiveSupport
.
on_load
(
:active_record
)
{
self
.
logger
||=
::
Rails
.
logger
}
end
initializer
"active_record.migration_error"
do
|
app
|
initializer
"active_record.migration_error"
do
if
config
.
active_record
.
delete
(
:migration_error
)
==
:page_load
config
.
app_middleware
.
insert_after
"::ActionDispatch::Callbacks"
,
"ActiveRecord::Migration::CheckPending"
...
...
@@ -158,7 +158,7 @@ class Railtie < Rails::Railtie # :nodoc:
end
# Expose database runtime to controller for logging.
initializer
"active_record.log_runtime"
do
|
app
|
initializer
"active_record.log_runtime"
do
require
"active_record/railties/controller_runtime"
ActiveSupport
.
on_load
(
:action_controller
)
do
include
ActiveRecord
::
Railties
::
ControllerRuntime
...
...
activerecord/test/cases/adapters/mysql2/reserved_word_test.rb
浏览文件 @
d338a0fe
...
...
@@ -84,7 +84,6 @@ def test_activerecord_model
assert_nothing_raised
{
x
.
save
}
assert_nothing_raised
{
Group
.
find_by_order
(
'y'
)
}
assert_nothing_raised
{
Group
.
find
(
1
)
}
x
=
Group
.
find
(
1
)
end
# has_one association with reserved-word table name
...
...
activerecord/test/cases/associations_test.rb
浏览文件 @
d338a0fe
...
...
@@ -95,7 +95,7 @@ def test_should_construct_new_finder_sql_after_create
def
test_force_reload
firm
=
Firm
.
new
(
"name"
=>
"A New Firm, Inc"
)
firm
.
save
firm
.
clients
.
each
{
|
c
|
}
# forcing to load all clients
firm
.
clients
.
each
{}
# forcing to load all clients
assert
firm
.
clients
.
empty?
,
"New firm shouldn't have client objects"
assert_equal
0
,
firm
.
clients
.
size
,
"New firm should have 0 clients"
...
...
activerecord/test/cases/connection_pool_test.rb
浏览文件 @
d338a0fe
...
...
@@ -185,7 +185,7 @@ def test_checkout_behaviour
assert_not_nil
connection
threads
=
[]
4
.
times
do
|
i
|
threads
<<
Thread
.
new
(
i
)
do
|
pool_count
|
threads
<<
Thread
.
new
(
i
)
do
connection
=
pool
.
connection
assert_not_nil
connection
connection
.
close
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录