Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
4c8c8c87
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 搜索 >>
提交
4c8c8c87
编写于
7月 31, 2019
作者:
R
Ryuta Kamizono
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Address to rubocop offences
上级
511d1abc
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
6 addition
and
6 deletion
+6
-6
activerecord/lib/arel/visitors/oracle.rb
activerecord/lib/arel/visitors/oracle.rb
+1
-1
activesupport/lib/active_support/inflector/methods.rb
activesupport/lib/active_support/inflector/methods.rb
+1
-1
railties/lib/rails/tasks/framework.rake
railties/lib/rails/tasks/framework.rake
+1
-1
railties/test/application/configuration_test.rb
railties/test/application/configuration_test.rb
+1
-1
railties/test/generators/namespaced_generators_test.rb
railties/test/generators/namespaced_generators_test.rb
+2
-2
未找到文件。
activerecord/lib/arel/visitors/oracle.rb
浏览文件 @
4c8c8c87
...
...
@@ -122,7 +122,7 @@ def order_hacks(o)
o
.
orders
=
[]
orders
.
each_with_index
do
|
order
,
i
|
o
.
orders
<<
Nodes
::
SqlLiteral
.
new
(
"alias_
#{
i
}
__
#{
' DESC'
if
/\bdesc$/i
===
order
}
"
)
Nodes
::
SqlLiteral
.
new
(
"alias_
#{
i
}
__
#{
' DESC'
if
/\bdesc$/i
.
match?
(
order
)
}
"
)
end
o
end
...
...
activesupport/lib/active_support/inflector/methods.rb
浏览文件 @
4c8c8c87
...
...
@@ -269,7 +269,7 @@ def foreign_key(class_name, separate_class_name_and_id_with_underscore = true)
# NameError is raised when the name is not in CamelCase or the constant is
# unknown.
def
constantize
(
camel_cased_word
)
if
camel_cased_word
.
blank?
||
!
camel_cased_word
.
include?
(
'::'
)
if
camel_cased_word
.
blank?
||
!
camel_cased_word
.
include?
(
"::"
)
Object
.
const_get
(
camel_cased_word
)
else
names
=
camel_cased_word
.
split
(
"::"
)
...
...
railties/lib/rails/tasks/framework.rake
浏览文件 @
4c8c8c87
...
...
@@ -8,7 +8,7 @@ namespace :app do
task
template: :environment
do
template
=
ENV
[
"LOCATION"
]
raise
"No LOCATION value given. Please set LOCATION either as path to a file or a URL"
if
template
.
blank?
template
=
File
.
expand_path
(
template
)
if
template
!~
%r{
\A
[A-Za-z][A-Za-z0-9+
\-\.
]*://}
template
=
File
.
expand_path
(
template
)
unless
%r{
\A
[A-Za-z][A-Za-z0-9+
\-\.
]*://}
.
match?
(
template
)
require
"rails/generators"
require
"rails/generators/rails/app/app_generator"
generator
=
Rails
::
Generators
::
AppGenerator
.
new
[
Rails
.
root
],
{},
{
destination_root:
Rails
.
root
}
...
...
railties/test/application/configuration_test.rb
浏览文件 @
4c8c8c87
...
...
@@ -790,7 +790,7 @@ def index
end
get
"/"
assert
/csrf\-param/
.
match?
(
last_response
.
body
)
assert
_match
(
/csrf\-param/
,
last_response
.
body
)
end
test
"default form builder specified as a string"
do
...
...
railties/test/generators/namespaced_generators_test.rb
浏览文件 @
4c8c8c87
...
...
@@ -308,7 +308,7 @@ def test_scaffold_with_namespace_on_revoke
run_generator
[
"admin/role"
],
behavior: :revoke
# Model
assert_file
"app/models/test_app/admin.rb"
# ( should not be remove )
assert_file
"app/models/test_app/admin.rb"
# ( should not be remove )
assert_no_file
"app/models/test_app/admin/role.rb"
assert_no_file
"test/models/test_app/admin/role_test.rb"
assert_no_file
"test/fixtures/test_app/admin/roles.yml"
...
...
@@ -375,7 +375,7 @@ def test_scaffold_with_nested_namespace_on_revoke
run_generator
[
"admin/user/special/role"
],
behavior: :revoke
# Model
assert_file
"app/models/test_app/admin/user/special.rb"
# ( should not be remove )
assert_file
"app/models/test_app/admin/user/special.rb"
# ( should not be remove )
assert_no_file
"app/models/test_app/admin/user/special/role.rb"
assert_no_file
"test/models/test_app/admin/user/special/role_test.rb"
assert_no_file
"test/fixtures/test_app/admin/user/special/roles.yml"
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录