Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
12325cf9
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 搜索 >>
提交
12325cf9
编写于
3月 04, 2011
作者:
R
R.T. Lechow
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Action Pack typos.
上级
238e6f0c
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
15 addition
and
15 deletion
+15
-15
actionpack/lib/action_controller/caching/actions.rb
actionpack/lib/action_controller/caching/actions.rb
+1
-1
actionpack/lib/action_controller/metal/instrumentation.rb
actionpack/lib/action_controller/metal/instrumentation.rb
+1
-1
actionpack/lib/action_dispatch/routing/mapper.rb
actionpack/lib/action_dispatch/routing/mapper.rb
+2
-2
actionpack/lib/action_view/helpers/date_helper.rb
actionpack/lib/action_view/helpers/date_helper.rb
+2
-2
actionpack/lib/action_view/helpers/form_tag_helper.rb
actionpack/lib/action_view/helpers/form_tag_helper.rb
+1
-1
actionpack/lib/action_view/helpers/number_helper.rb
actionpack/lib/action_view/helpers/number_helper.rb
+3
-3
actionpack/lib/action_view/helpers/translation_helper.rb
actionpack/lib/action_view/helpers/translation_helper.rb
+1
-1
actionpack/lib/action_view/locale/en.yml
actionpack/lib/action_view/locale/en.yml
+1
-1
actionpack/lib/action_view/template/handlers/erb.rb
actionpack/lib/action_view/template/handlers/erb.rb
+1
-1
actionpack/test/controller/routing_test.rb
actionpack/test/controller/routing_test.rb
+1
-1
actionpack/test/template/number_helper_test.rb
actionpack/test/template/number_helper_test.rb
+1
-1
未找到文件。
actionpack/lib/action_controller/caching/actions.rb
浏览文件 @
12325cf9
...
...
@@ -80,7 +80,7 @@ module Caching
# header the Content-Type of the cached response could be wrong because
# no information about the MIME type is stored in the cache key. So, if
# you first ask for MIME type M in the Accept header, a cache entry is
# created, and then perform a second re
s
quest to the same resource asking
# created, and then perform a second request to the same resource asking
# for a different MIME type, you'd get the content cached for M.
#
# The <tt>:format</tt> parameter is taken into account though. The safest
...
...
actionpack/lib/action_controller/metal/instrumentation.rb
浏览文件 @
12325cf9
...
...
@@ -78,7 +78,7 @@ def cleanup_view_runtime #:nodoc:
yield
end
# Everytime after an action is processed, this method is invoked
# Every
time after an action is processed, this method is invoked
# with the payload, so you can add more information.
# :api: plugin
def
append_info_to_payload
(
payload
)
#:nodoc:
...
...
actionpack/lib/action_dispatch/routing/mapper.rb
浏览文件 @
12325cf9
...
...
@@ -700,7 +700,7 @@ def namespace(path, options = {})
# Now routes such as +/posts/1+ will no longer be valid, but +/posts/1.1+ will be.
# The +id+ parameter must match the constraint passed in for this example.
#
# You may use this to also resrict other parameters:
# You may use this to also res
t
rict other parameters:
#
# resources :posts do
# constraints(:post_id => /\d+\.\d+) do
...
...
@@ -720,7 +720,7 @@ def namespace(path, options = {})
#
# === Dynamic request matching
#
# Requests to routes can be constrained based on specific critera:
# Requests to routes can be constrained based on specific criter
i
a:
#
# constraints(lambda { |req| req.env["HTTP_USER_AGENT"] =~ /iPhone/ }) do
# resources :iphones
...
...
actionpack/lib/action_view/helpers/date_helper.rb
浏览文件 @
12325cf9
...
...
@@ -617,7 +617,7 @@ def select_datetime
@options
[
:discard_second
]
||=
true
unless
@options
[
:include_seconds
]
&&
!
@options
[
:discard_minute
]
# If the day is hidden and the month is visible, the day should be set to the 1st so all month choices are
# valid (otherwise it could be 31 and
f
ebruary wouldn't be a valid date)
# valid (otherwise it could be 31 and
F
ebruary wouldn't be a valid date)
if
@datetime
&&
@options
[
:discard_day
]
&&
!
@options
[
:discard_month
]
@datetime
=
@datetime
.
change
(
:day
=>
1
)
end
...
...
@@ -644,7 +644,7 @@ def select_date
@options
[
:discard_day
]
||=
true
if
@options
[
:discard_month
]
||
!
order
.
include?
(
:day
)
# If the day is hidden and the month is visible, the day should be set to the 1st so all month choices are
# valid (otherwise it could be 31 and
f
ebruary wouldn't be a valid date)
# valid (otherwise it could be 31 and
F
ebruary wouldn't be a valid date)
if
@datetime
&&
@options
[
:discard_day
]
&&
!
@options
[
:discard_month
]
@datetime
=
@datetime
.
change
(
:day
=>
1
)
end
...
...
actionpack/lib/action_view/helpers/form_tag_helper.rb
浏览文件 @
12325cf9
...
...
@@ -592,7 +592,7 @@ def html_options_for_form(url_for_options, options, *parameters_for_url)
options
.
stringify_keys
.
tap
do
|
html_options
|
html_options
[
"enctype"
]
=
"multipart/form-data"
if
html_options
.
delete
(
"multipart"
)
# The following URL is unescaped, this is just a hash of options, and it is the
# respons
a
bility of the caller to escape all the values.
# respons
i
bility of the caller to escape all the values.
html_options
[
"action"
]
=
url_for
(
url_for_options
,
*
parameters_for_url
)
html_options
[
"accept-charset"
]
=
"UTF-8"
html_options
[
"data-remote"
]
=
true
if
html_options
.
delete
(
"remote"
)
...
...
actionpack/lib/action_view/helpers/number_helper.rb
浏览文件 @
12325cf9
...
...
@@ -369,7 +369,7 @@ def number_to_human_size(number, options = {})
# See <tt>number_to_human_size</tt> if you want to print a file size.
#
# You can also define you own unit-quantifier names if you want to use other decimal units
# (eg.: 1500 becomes "1.5 kilometers", 0.150 becomes "150 mililiters", etc). You may define
# (eg.: 1500 becomes "1.5 kilometers", 0.150 becomes "150 mil
l
iliters", etc). You may define
# a wide range of unit quantifiers, even fractional ones (centi, deci, mili, etc).
#
# ==== Options
...
...
@@ -425,13 +425,13 @@ def number_to_human_size(number, options = {})
# thousand:
# one: "kilometer"
# other: "kilometers"
# billion: "gazilion-distance"
# billion: "gazil
l
ion-distance"
#
# Then you could do:
#
# number_to_human(543934, :units => :distance) # => "544 kilometers"
# number_to_human(54393498, :units => :distance) # => "54400 kilometers"
# number_to_human(54393498000, :units => :distance) # => "54.4 gazilion-distance"
# number_to_human(54393498000, :units => :distance) # => "54.4 gazil
l
ion-distance"
# number_to_human(343, :units => :distance, :precision => 1) # => "300 meters"
# number_to_human(1, :units => :distance) # => "1 meter"
# number_to_human(0.34, :units => :distance) # => "34 centimeters"
...
...
actionpack/lib/action_view/helpers/translation_helper.rb
浏览文件 @
12325cf9
...
...
@@ -26,7 +26,7 @@ module TranslationHelper
#
# E.g. the value returned for a missing translation key :"blog.post.title" will be
# <span class="translation_missing" title="translation missing: blog.post.title">Title</span>.
# This way your views will display rather reasonable
ful
strings but it will still
# This way your views will display rather reasonable strings but it will still
# be easy to spot missing translations.
#
# Second, it'll scope the key by the current partial if the key starts
...
...
actionpack/lib/action_view/locale/en.yml
浏览文件 @
12325cf9
...
...
@@ -5,7 +5,7 @@
format
:
# Sets the separator between the units, for more precision (e.g. 1.0 / 2.0 == 0.5)
separator
:
"
."
# Delim
e
ts thousands (e.g. 1,000,000 is a million) (always in groups of three)
# Delim
i
ts thousands (e.g. 1,000,000 is a million) (always in groups of three)
delimiter
:
"
,"
# Number of decimals, behind the separator (the number 1 with a precision of 2 gives: 1.00)
precision
:
3
...
...
actionpack/lib/action_view/template/handlers/erb.rb
浏览文件 @
12325cf9
...
...
@@ -63,7 +63,7 @@ class ERB
class_attribute
:default_format
self
.
default_format
=
Mime
::
HTML
# Default implemenation used.
# Default implemen
t
ation used.
class_attribute
:erb_implementation
self
.
erb_implementation
=
Erubis
...
...
actionpack/test/controller/routing_test.rb
浏览文件 @
12325cf9
...
...
@@ -407,7 +407,7 @@ def test_route_with_text_default
assert_equal
'/page/foo'
,
url_for
(
rs
,
{
:controller
=>
'content'
,
:action
=>
'show_page'
,
:id
=>
'foo'
})
assert_equal
({
:controller
=>
"content"
,
:action
=>
'show_page'
,
:id
=>
'foo'
},
rs
.
recognize_path
(
"/page/foo"
))
token
=
"
\321\202\320\265\320\272\321\201\321\202
"
# 'text' in
r
ussian
token
=
"
\321\202\320\265\320\272\321\201\321\202
"
# 'text' in
R
ussian
token
.
force_encoding
(
Encoding
::
BINARY
)
if
token
.
respond_to?
(
:force_encoding
)
escaped_token
=
CGI
::
escape
(
token
)
...
...
actionpack/test/template/number_helper_test.rb
浏览文件 @
12325cf9
...
...
@@ -140,7 +140,7 @@ def test_number_with_precision_with_strip_insignificant_zeros
def
test_number_with_precision_with_significant_true_and_zero_precision
# Zero precision with significant is a mistake (would always return zero),
# so we treat it as if significant was false (increases backwards compatibily for number_to_human_size)
# so we treat it as if significant was false (increases backwards compatibil
it
y for number_to_human_size)
assert_equal
"124"
,
number_with_precision
(
123.987
,
:precision
=>
0
,
:significant
=>
true
)
assert_equal
"12"
,
number_with_precision
(
12
,
:precision
=>
0
,
:significant
=>
true
)
assert_equal
"12"
,
number_with_precision
(
"12.3"
,
:precision
=>
0
,
:significant
=>
true
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录