Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
8c147bcd
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,发现更多精彩内容 >>
提交
8c147bcd
编写于
7月 17, 2015
作者:
R
Rafael Mendonça França
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #20918 from jonatack/fix-lookup-grammar
[skip ci] Lookup can be a noun but it is not a verb
上级
2c79122c
ea747f7d
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
17 addition
and
14 deletion
+17
-14
actionpack/CHANGELOG.md
actionpack/CHANGELOG.md
+2
-1
actionview/lib/action_view/helpers/date_helper.rb
actionview/lib/action_view/helpers/date_helper.rb
+1
-1
actionview/lib/action_view/lookup_context.rb
actionview/lib/action_view/lookup_context.rb
+5
-4
actionview/lib/action_view/rendering.rb
actionview/lib/action_view/rendering.rb
+1
-1
actionview/lib/action_view/view_paths.rb
actionview/lib/action_view/view_paths.rb
+3
-3
activesupport/lib/active_support/core_ext/time/zones.rb
activesupport/lib/active_support/core_ext/time/zones.rb
+2
-1
railties/lib/rails/generators/base.rb
railties/lib/rails/generators/base.rb
+3
-3
未找到文件。
actionpack/CHANGELOG.md
浏览文件 @
8c147bcd
...
...
@@ -183,7 +183,8 @@
*arthurnn*
*
`ActionController#translate`
supports symbols as shortcuts.
When shortcut is given it also lookups without action name.
When a shortcut is given it also performs the lookup without the action
name.
*Max Melentiev*
...
...
actionview/lib/action_view/helpers/date_helper.rb
浏览文件 @
8c147bcd
...
...
@@ -70,7 +70,7 @@ module DateHelper
# distance_of_time_in_words(Time.now, Time.now) # => less than a minute
#
# With the <tt>scope</tt> option, you can define a custom scope for Rails
# to lookup the translation.
# to look
up the translation.
#
# For example you can define the following in your locale (e.g. en.yml).
#
...
...
actionview/lib/action_view/lookup_context.rb
浏览文件 @
8c147bcd
...
...
@@ -6,10 +6,11 @@
module
ActionView
# = Action View Lookup Context
#
# <tt>LookupContext</tt> is the object responsible to hold all information required to lookup
# templates, i.e. view paths and details. The LookupContext is also responsible to
# generate a key, given to view paths, used in the resolver cache lookup. Since
# this key is generated just once during the request, it speeds up all cache accesses.
# <tt>LookupContext</tt> is the object responsible for holding all information
# required for looking up templates, i.e. view paths and details.
# <tt>LookupContext</tt> is also responsible for generating a key, given to
# view paths, used in the resolver cache lookup. Since this key is generated
# only once during the request, it speeds up all cache accesses.
class
LookupContext
#:nodoc:
attr_accessor
:prefixes
,
:rendered_format
...
...
actionview/lib/action_view/rendering.rb
浏览文件 @
8c147bcd
...
...
@@ -103,7 +103,7 @@ def _render_template(options) #:nodoc:
view_renderer
.
render
(
context
,
options
)
end
# Assign the rendered format to lookup context.
# Assign the rendered format to look
up context.
def
_process_format
(
format
,
options
=
{})
#:nodoc:
super
lookup_context
.
formats
=
[
format
.
to_sym
]
...
...
actionview/lib/action_view/view_paths.rb
浏览文件 @
8c147bcd
...
...
@@ -36,9 +36,9 @@ def _prefixes # :nodoc:
self
.
class
.
_prefixes
end
# <tt>LookupContext</tt> is the object responsible
to hold all information required to lookup
#
templates, i.e. view paths and details. Check <tt>ActionView::LookupContext</tt> for more
# information.
# <tt>LookupContext</tt> is the object responsible
for holding all
#
information required for looking up templates, i.e. view paths and
#
details. Check <tt>ActionView::LookupContext</tt> for more
information.
def
lookup_context
@_lookup_context
||=
ActionView
::
LookupContext
.
new
(
self
.
class
.
_view_paths
,
details_for_lookup
,
_prefixes
)
...
...
activesupport/lib/active_support/core_ext/time/zones.rb
浏览文件 @
8c147bcd
...
...
@@ -65,7 +65,8 @@ def find_zone!(time_zone)
if
!
time_zone
||
time_zone
.
is_a?
(
ActiveSupport
::
TimeZone
)
time_zone
else
# lookup timezone based on identifier (unless we've been passed a TZInfo::Timezone)
# Look up the timezone based on the identifier (unless we've been
# passed a TZInfo::Timezone)
unless
time_zone
.
respond_to?
(
:period_for_local
)
time_zone
=
ActiveSupport
::
TimeZone
[
time_zone
]
||
TZInfo
::
Timezone
.
get
(
time_zone
)
end
...
...
railties/lib/rails/generators/base.rb
浏览文件 @
8c147bcd
...
...
@@ -103,12 +103,12 @@ def self.hide!
# hook_for :test_framework, as: :controller
# end
#
# And now it will lookup at:
# And now it will look
up at:
#
# "test_unit:controller", "test_unit"
#
# Similarly, if you want it to also look
up in the rails namespace, you just
# need to provide the :in value:
# Similarly, if you want it to also look
up in the rails namespace, you
#
just
need to provide the :in value:
#
# class AwesomeGenerator < Rails::Generators::Base
# hook_for :test_framework, in: :rails, as: :controller
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录