Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
1a5fdf77
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,发现更多精彩内容 >>
提交
1a5fdf77
编写于
4月 11, 2016
作者:
J
Jeremy Daer
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #24492 from vipulnsward/pass-over-warnings
Clean up all Rails 5 warnings. Revert auto-added periods.
上级
dbb2c2c7
ac027338
变更
14
隐藏空白更改
内联
并排
Showing
14 changed file
with
19 addition
and
20 deletion
+19
-20
actionpack/lib/action_controller/metal/request_forgery_protection.rb
...lib/action_controller/metal/request_forgery_protection.rb
+1
-1
actionpack/lib/action_dispatch/routing/mapper.rb
actionpack/lib/action_dispatch/routing/mapper.rb
+1
-1
actionpack/lib/action_dispatch/routing/route_set.rb
actionpack/lib/action_dispatch/routing/route_set.rb
+2
-2
actionpack/lib/action_dispatch/testing/integration.rb
actionpack/lib/action_dispatch/testing/integration.rb
+1
-1
actionpack/test/controller/live_stream_test.rb
actionpack/test/controller/live_stream_test.rb
+1
-1
activemodel/lib/active_model/errors.rb
activemodel/lib/active_model/errors.rb
+2
-2
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
...ecord/connection_adapters/postgresql/schema_statements.rb
+2
-2
activerecord/lib/active_record/core.rb
activerecord/lib/active_record/core.rb
+1
-1
activerecord/lib/active_record/reflection.rb
activerecord/lib/active_record/reflection.rb
+1
-1
activerecord/lib/active_record/relation.rb
activerecord/lib/active_record/relation.rb
+3
-3
activerecord/lib/active_record/relation/batches.rb
activerecord/lib/active_record/relation/batches.rb
+1
-1
activerecord/lib/active_record/relation/finder_methods.rb
activerecord/lib/active_record/relation/finder_methods.rb
+2
-2
activesupport/lib/active_support/cache/strategy/local_cache.rb
...esupport/lib/active_support/cache/strategy/local_cache.rb
+1
-1
activesupport/lib/active_support/deprecation/reporting.rb
activesupport/lib/active_support/deprecation/reporting.rb
+0
-1
未找到文件。
actionpack/lib/action_controller/metal/request_forgery_protection.rb
浏览文件 @
1a5fdf77
...
...
@@ -213,7 +213,7 @@ def verify_authenticity_token
if
!
verified_request?
if
logger
&&
log_warning_on_csrf_failure
logger
.
warn
"Can't verify CSRF token authenticity"
logger
.
warn
"Can't verify CSRF token authenticity
.
"
end
handle_unverified_request
end
...
...
actionpack/lib/action_dispatch/routing/mapper.rb
浏览文件 @
1a5fdf77
...
...
@@ -1598,7 +1598,7 @@ def match(path, *rest)
route_options
=
options
.
dup
if
_path
&&
option_path
ActiveSupport
::
Deprecation
.
warn
<<-
eowarn
Specifying strings for both :path and the route path is deprecated.
Change things like this:
Specifying strings for both :path and the route path is deprecated. Change things like this:
match
#{
_path
.
inspect
}
, :path =>
#{
option_path
.
inspect
}
...
...
actionpack/lib/action_dispatch/routing/route_set.rb
浏览文件 @
1a5fdf77
...
...
@@ -517,14 +517,14 @@ def add_route(mapping, path_ast, name, anchor)
if
route
.
segment_keys
.
include?
(
:controller
)
ActiveSupport
::
Deprecation
.
warn
(
<<-
MSG
.
squish
)
Using a dynamic :controller segment in a route is deprecated and
will be removed in Rails 5.1
will be removed in Rails 5.1
.
MSG
end
if
route
.
segment_keys
.
include?
(
:action
)
ActiveSupport
::
Deprecation
.
warn
(
<<-
MSG
.
squish
)
Using a dynamic :action segment in a route is deprecated and
will be removed in Rails 5.1
will be removed in Rails 5.1
.
MSG
end
...
...
actionpack/lib/action_dispatch/testing/integration.rb
浏览文件 @
1a5fdf77
...
...
@@ -95,7 +95,7 @@ def xml_http_request(request_method, path, *args)
ActiveSupport
::
Deprecation
.
warn
(
<<-
MSG
.
strip_heredoc
)
xhr and xml_http_request methods are deprecated in favor of
`get "/posts", xhr: true` and `post "/posts/1", xhr: true`
`get "/posts", xhr: true` and `post "/posts/1", xhr: true`
.
MSG
process
(
request_method
,
path
,
params:
params
,
headers:
headers
,
xhr:
true
)
...
...
actionpack/test/controller/live_stream_test.rb
浏览文件 @
1a5fdf77
...
...
@@ -205,7 +205,7 @@ def exception_in_exception_callback
def
overfill_buffer_and_die
logger
=
ActionController
::
Base
.
logger
||
Logger
.
new
(
$stdout
)
response
.
stream
.
on_error
do
logger
.
warn
'Error while streaming'
logger
.
warn
'Error while streaming
.
'
error_latch
.
count_down
end
...
...
activemodel/lib/active_model/errors.rb
浏览文件 @
1a5fdf77
...
...
@@ -346,7 +346,7 @@ def add(attribute, message = :invalid, options = {})
# # => {:name=>["can't be empty"]}
def
add_on_empty
(
attributes
,
options
=
{})
ActiveSupport
::
Deprecation
.
warn
(
<<-
MESSAGE
.
squish
)
ActiveModel::Errors#add_on_empty is deprecated and will be removed in Rails 5.1
ActiveModel::Errors#add_on_empty is deprecated and will be removed in Rails 5.1
.
To achieve the same use:
...
...
@@ -368,7 +368,7 @@ def add_on_empty(attributes, options = {})
# # => {:name=>["can't be blank"]}
def
add_on_blank
(
attributes
,
options
=
{})
ActiveSupport
::
Deprecation
.
warn
(
<<-
MESSAGE
.
squish
)
ActiveModel::Errors#add_on_blank is deprecated and will be removed in Rails 5.1
ActiveModel::Errors#add_on_blank is deprecated and will be removed in Rails 5.1
.
To achieve the same use:
...
...
activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
浏览文件 @
1a5fdf77
...
...
@@ -325,7 +325,7 @@ def set_pk_sequence!(table, value) #:nodoc:
select_value
(
"SELECT setval('
#{
quoted_sequence
}
',
#{
value
}
)"
,
'SCHEMA'
)
else
@logger
.
warn
"
#{
table
}
has primary key
#{
pk
}
with no default sequence"
if
@logger
@logger
.
warn
"
#{
table
}
has primary key
#{
pk
}
with no default sequence
.
"
if
@logger
end
end
end
...
...
@@ -340,7 +340,7 @@ def reset_pk_sequence!(table, pk = nil, sequence = nil) #:nodoc:
end
if
@logger
&&
pk
&&
!
sequence
@logger
.
warn
"
#{
table
}
has primary key
#{
pk
}
with no default sequence"
@logger
.
warn
"
#{
table
}
has primary key
#{
pk
}
with no default sequence
.
"
end
if
pk
&&
sequence
...
...
activerecord/lib/active_record/core.rb
浏览文件 @
1a5fdf77
...
...
@@ -159,7 +159,7 @@ def find(*ids) # :nodoc:
id
=
id
.
id
ActiveSupport
::
Deprecation
.
warn
(
<<-
MSG
.
squish
)
You are passing an instance of ActiveRecord::Base to `find`.
Please pass the id of the object by calling `.id`
Please pass the id of the object by calling `.id`
.
MSG
end
...
...
activerecord/lib/active_record/reflection.rb
浏览文件 @
1a5fdf77
...
...
@@ -874,7 +874,7 @@ def source_reflection_name # :nodoc:
example_options
=
options
.
dup
example_options
[
:source
]
=
source_reflection_names
.
first
ActiveSupport
::
Deprecation
.
warn
\
"Ambiguous source reflection for through association.
Please "
\
"Ambiguous source reflection for through association. Please "
\
"specify a :source directive on your declaration like:
\n
"
\
"
\n
"
\
" class
#{
active_record
.
name
}
< ActiveRecord::Base
\n
"
\
...
...
activerecord/lib/active_record/relation.rb
浏览文件 @
1a5fdf77
...
...
@@ -428,7 +428,7 @@ def update(id = :all, attributes)
id
=
id
.
id
ActiveSupport
::
Deprecation
.
warn
(
<<-
MSG
.
squish
)
You are passing an instance of ActiveRecord::Base to `update`.
Please pass the id of the object by calling `.id`
Please pass the id of the object by calling `.id`
.
MSG
end
object
=
find
(
id
)
...
...
@@ -457,7 +457,7 @@ def destroy_all(conditions = nil)
if
conditions
ActiveSupport
::
Deprecation
.
warn
(
<<-
MESSAGE
.
squish
)
Passing conditions to destroy_all is deprecated and will be removed in Rails 5.1.
To achieve the same use where(conditions).destroy_all
To achieve the same use where(conditions).destroy_all
.
MESSAGE
where
(
conditions
).
destroy_all
else
...
...
@@ -527,7 +527,7 @@ def delete_all(conditions = nil)
if
conditions
ActiveSupport
::
Deprecation
.
warn
(
<<-
MESSAGE
.
squish
)
Passing conditions to delete_all is deprecated and will be removed in Rails 5.1.
To achieve the same use where(conditions).delete_all
To achieve the same use where(conditions).delete_all
.
MESSAGE
where
(
conditions
).
delete_all
else
...
...
activerecord/lib/active_record/relation/batches.rb
浏览文件 @
1a5fdf77
...
...
@@ -2,7 +2,7 @@
module
ActiveRecord
module
Batches
ORDER_OR_LIMIT_IGNORED_MESSAGE
=
"Scoped order and limit are ignored, it's forced to be batch order and batch size"
ORDER_OR_LIMIT_IGNORED_MESSAGE
=
"Scoped order and limit are ignored, it's forced to be batch order and batch size
.
"
# Looping through a collection of records from the database
# (using the Scoping::Named::ClassMethods.all method, for example)
...
...
activerecord/lib/active_record/relation/finder_methods.rb
浏览文件 @
1a5fdf77
...
...
@@ -312,7 +312,7 @@ def exists?(conditions = :none)
conditions
=
conditions
.
id
ActiveSupport
::
Deprecation
.
warn
(
<<-
MSG
.
squish
)
You are passing an instance of ActiveRecord::Base to `exists?`.
Please pass the id of the object by calling `.id`
Please pass the id of the object by calling `.id`
.
MSG
end
...
...
@@ -467,7 +467,7 @@ def find_one(id)
id
=
id
.
id
ActiveSupport
::
Deprecation
.
warn
(
<<-
MSG
.
squish
)
You are passing an instance of ActiveRecord::Base to `find`.
Please pass the id of the object by calling `.id`
Please pass the id of the object by calling `.id`
.
MSG
end
...
...
activesupport/lib/active_support/cache/strategy/local_cache.rb
浏览文件 @
1a5fdf77
...
...
@@ -126,7 +126,7 @@ def delete_entry(key, options) # :nodoc:
def
set_cache_value
(
value
,
name
,
amount
,
options
)
# :nodoc:
ActiveSupport
::
Deprecation
.
warn
(
<<-
MESSAGE
.
strip_heredoc
)
`set_cache_value` is deprecated and will be removed from Rails 5.1.
Please use `write_cache_value`
Please use `write_cache_value`
instead.
MESSAGE
write_cache_value
name
,
value
,
options
end
...
...
activesupport/lib/active_support/deprecation/reporting.rb
浏览文件 @
1a5fdf77
...
...
@@ -65,7 +65,6 @@ def deprecated_method_warning(method_name, message = nil)
def
deprecation_message
(
callstack
,
message
=
nil
)
message
||=
"You are using deprecated behavior which will be removed from the next major or minor release."
message
+=
'.'
unless
message
=~
/\.$/
"DEPRECATION WARNING:
#{
message
}
#{
deprecation_caller_message
(
callstack
)
}
"
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录