Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
dd5b083f
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 搜索 >>
提交
dd5b083f
编写于
9月 28, 2015
作者:
R
Ronak Jangir
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Renamed ‘Return’ to ‘Returns’ [ci skip]
上级
6474c53d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
9 addition
and
9 deletion
+9
-9
actionpack/lib/action_controller/metal/strong_parameters.rb
actionpack/lib/action_controller/metal/strong_parameters.rb
+1
-1
actionpack/lib/action_dispatch/http/filter_parameters.rb
actionpack/lib/action_dispatch/http/filter_parameters.rb
+2
-2
activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
...lib/active_support/core_ext/date_and_time/calculations.rb
+1
-1
activesupport/lib/active_support/core_ext/time/calculations.rb
...esupport/lib/active_support/core_ext/time/calculations.rb
+1
-1
activesupport/lib/active_support/values/time_zone.rb
activesupport/lib/active_support/values/time_zone.rb
+1
-1
railties/lib/rails/application.rb
railties/lib/rails/application.rb
+1
-1
railties/lib/rails/generators/base.rb
railties/lib/rails/generators/base.rb
+2
-2
未找到文件。
actionpack/lib/action_controller/metal/strong_parameters.rb
浏览文件 @
dd5b083f
...
@@ -540,7 +540,7 @@ def reject!(&block)
...
@@ -540,7 +540,7 @@ def reject!(&block)
end
end
alias_method
:delete_if
,
:reject!
alias_method
:delete_if
,
:reject!
# Return values that were assigned to the given +keys+. Note that all the
# Return
s
values that were assigned to the given +keys+. Note that all the
# +Hash+ objects will be converted to <tt>ActionController::Parameters</tt>.
# +Hash+ objects will be converted to <tt>ActionController::Parameters</tt>.
def
values_at
(
*
keys
)
def
values_at
(
*
keys
)
convert_value_to_parameters
(
@parameters
.
values_at
(
*
keys
))
convert_value_to_parameters
(
@parameters
.
values_at
(
*
keys
))
...
...
actionpack/lib/action_dispatch/http/filter_parameters.rb
浏览文件 @
dd5b083f
...
@@ -30,12 +30,12 @@ def initialize
...
@@ -30,12 +30,12 @@ def initialize
@filtered_path
=
nil
@filtered_path
=
nil
end
end
# Return a hash of parameters with all sensitive data replaced.
# Return
s
a hash of parameters with all sensitive data replaced.
def
filtered_parameters
def
filtered_parameters
@filtered_parameters
||=
parameter_filter
.
filter
(
parameters
)
@filtered_parameters
||=
parameter_filter
.
filter
(
parameters
)
end
end
# Return a hash of request.env with all sensitive data replaced.
# Return
s
a hash of request.env with all sensitive data replaced.
def
filtered_env
def
filtered_env
@filtered_env
||=
env_filter
.
filter
(
@env
)
@filtered_env
||=
env_filter
.
filter
(
@env
)
end
end
...
...
activesupport/lib/active_support/core_ext/date_and_time/calculations.rb
浏览文件 @
dd5b083f
...
@@ -135,7 +135,7 @@ def end_of_quarter
...
@@ -135,7 +135,7 @@ def end_of_quarter
end
end
alias
:at_end_of_quarter
:end_of_quarter
alias
:at_end_of_quarter
:end_of_quarter
# Return a new date/time at the beginning of the year.
# Return
s
a new date/time at the beginning of the year.
#
#
# today = Date.today # => Fri, 10 Jul 2015
# today = Date.today # => Fri, 10 Jul 2015
# today.beginning_of_year # => Thu, 01 Jan 2015
# today.beginning_of_year # => Thu, 01 Jan 2015
...
...
activesupport/lib/active_support/core_ext/time/calculations.rb
浏览文件 @
dd5b083f
...
@@ -16,7 +16,7 @@ def ===(other)
...
@@ -16,7 +16,7 @@ def ===(other)
super
||
(
self
==
Time
&&
other
.
is_a?
(
ActiveSupport
::
TimeWithZone
))
super
||
(
self
==
Time
&&
other
.
is_a?
(
ActiveSupport
::
TimeWithZone
))
end
end
# Return the number of days in the given month.
# Return
s
the number of days in the given month.
# If no year is specified, it will use the current year.
# If no year is specified, it will use the current year.
def
days_in_month
(
month
,
year
=
now
.
year
)
def
days_in_month
(
month
,
year
=
now
.
year
)
if
month
==
2
&&
::
Date
.
gregorian_leap?
(
year
)
if
month
==
2
&&
::
Date
.
gregorian_leap?
(
year
)
...
...
activesupport/lib/active_support/values/time_zone.rb
浏览文件 @
dd5b083f
...
@@ -384,7 +384,7 @@ def now
...
@@ -384,7 +384,7 @@ def now
time_now
.
utc
.
in_time_zone
(
self
)
time_now
.
utc
.
in_time_zone
(
self
)
end
end
# Return the current date in this time zone.
# Return
s
the current date in this time zone.
def
today
def
today
tzinfo
.
now
.
to_date
tzinfo
.
now
.
to_date
end
end
...
...
railties/lib/rails/application.rb
浏览文件 @
dd5b083f
...
@@ -170,7 +170,7 @@ def reload_routes!
...
@@ -170,7 +170,7 @@ def reload_routes!
routes_reloader
.
reload!
routes_reloader
.
reload!
end
end
# Return the application's KeyGenerator
# Return
s
the application's KeyGenerator
def
key_generator
def
key_generator
# number of iterations selected based on consultation with the google security
# number of iterations selected based on consultation with the google security
# team. Details at https://github.com/rails/rails/pull/6952#issuecomment-7661220
# team. Details at https://github.com/rails/rails/pull/6952#issuecomment-7661220
...
...
railties/lib/rails/generators/base.rb
浏览文件 @
dd5b083f
...
@@ -302,13 +302,13 @@ def self.default_value_for_option(name, options)
...
@@ -302,13 +302,13 @@ def self.default_value_for_option(name, options)
default_for_option
(
Rails
::
Generators
.
options
,
name
,
options
,
options
[
:default
])
default_for_option
(
Rails
::
Generators
.
options
,
name
,
options
,
options
[
:default
])
end
end
# Return default aliases for the option name given doing a lookup in
# Return
s
default aliases for the option name given doing a lookup in
# Rails::Generators.aliases.
# Rails::Generators.aliases.
def
self
.
default_aliases_for_option
(
name
,
options
)
def
self
.
default_aliases_for_option
(
name
,
options
)
default_for_option
(
Rails
::
Generators
.
aliases
,
name
,
options
,
options
[
:aliases
])
default_for_option
(
Rails
::
Generators
.
aliases
,
name
,
options
,
options
[
:aliases
])
end
end
# Return default for the option name given doing a lookup in config.
# Return
s
default for the option name given doing a lookup in config.
def
self
.
default_for_option
(
config
,
name
,
options
,
default
)
def
self
.
default_for_option
(
config
,
name
,
options
,
default
)
if
generator_name
and
c
=
config
[
generator_name
.
to_sym
]
and
c
.
key?
(
name
)
if
generator_name
and
c
=
config
[
generator_name
.
to_sym
]
and
c
.
key?
(
name
)
c
[
name
]
c
[
name
]
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录