Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
4b8953cc
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 搜索 >>
未验证
提交
4b8953cc
编写于
11月 22, 2017
作者:
R
Rafael França
提交者:
GitHub
11月 22, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #31204 from tjschuck/doc_fix_some_backticks_to_tt
Update incorrect backtick usage in RDoc to teletype
上级
078421ba
3063ace1
变更
13
隐藏空白更改
内联
并排
Showing
13 changed file
with
27 addition
and
27 deletion
+27
-27
actionpack/lib/action_controller/metal/redirecting.rb
actionpack/lib/action_controller/metal/redirecting.rb
+2
-2
actionpack/lib/action_controller/metal/request_forgery_protection.rb
...lib/action_controller/metal/request_forgery_protection.rb
+3
-3
actionpack/lib/action_dispatch/routing/url_for.rb
actionpack/lib/action_dispatch/routing/url_for.rb
+1
-1
activerecord/lib/active_record/migration.rb
activerecord/lib/active_record/migration.rb
+2
-2
activesupport/lib/active_support/cache/redis_cache_store.rb
activesupport/lib/active_support/cache/redis_cache_store.rb
+5
-5
activesupport/lib/active_support/core_ext/array/access.rb
activesupport/lib/active_support/core_ext/array/access.rb
+2
-2
activesupport/lib/active_support/core_ext/date_time/compatibility.rb
...rt/lib/active_support/core_ext/date_time/compatibility.rb
+2
-2
activesupport/lib/active_support/core_ext/object/with_options.rb
...upport/lib/active_support/core_ext/object/with_options.rb
+1
-1
activesupport/lib/active_support/core_ext/string/inflections.rb
...support/lib/active_support/core_ext/string/inflections.rb
+1
-1
activesupport/lib/active_support/core_ext/string/output_safety.rb
...pport/lib/active_support/core_ext/string/output_safety.rb
+1
-1
activesupport/lib/active_support/inflector/transliterate.rb
activesupport/lib/active_support/inflector/transliterate.rb
+2
-2
activesupport/lib/active_support/message_encryptor.rb
activesupport/lib/active_support/message_encryptor.rb
+2
-2
activesupport/lib/active_support/message_verifier.rb
activesupport/lib/active_support/message_verifier.rb
+3
-3
未找到文件。
actionpack/lib/action_controller/metal/redirecting.rb
浏览文件 @
4b8953cc
...
...
@@ -68,7 +68,7 @@ def redirect_to(options = {}, response_status = {})
# if possible, otherwise redirects to the provided default fallback
# location.
#
# The referrer information is pulled from the HTTP
`Referer`
(sic) header on
# The referrer information is pulled from the HTTP
+Referer+
(sic) header on
# the request. This is an optional header and its presence on the request is
# subject to browser security settings and user preferences. If the request
# is missing this header, the <tt>fallback_location</tt> will be used.
...
...
@@ -82,7 +82,7 @@ def redirect_to(options = {}, response_status = {})
# redirect_back fallback_location: '/', allow_other_host: false
#
# ==== Options
# * <tt>:fallback_location</tt> - The default fallback location that will be used on missing
`Referer`
header.
# * <tt>:fallback_location</tt> - The default fallback location that will be used on missing
+Referer+
header.
# * <tt>:allow_other_host</tt> - Allows or disallow redirection to the host that is different to the current host
#
# All other options that can be passed to <tt>redirect_to</tt> are accepted as
...
...
actionpack/lib/action_controller/metal/request_forgery_protection.rb
浏览文件 @
4b8953cc
...
...
@@ -216,7 +216,7 @@ def handle_unverified_request
# The actual before_action that is used to verify the CSRF token.
# Don't override this directly. Provide your own forgery protection
# strategy instead. If you override, you'll disable same-origin
#
`<script>`
verification.
#
<tt><script></tt>
verification.
#
# Lean on the protect_from_forgery declaration to mark which actions are
# due for same-origin request verification. If protect_from_forgery is
...
...
@@ -250,7 +250,7 @@ def handle_unverified_request # :doc:
private_constant
:CROSS_ORIGIN_JAVASCRIPT_WARNING
# :startdoc:
# If
`verify_authenticity_token`
was run (indicating that we have
# If
+verify_authenticity_token+
was run (indicating that we have
# forgery protection enabled for this request) then also verify that
# we aren't serving an unauthorized cross-origin response.
def
verify_same_origin_request
# :doc:
...
...
@@ -267,7 +267,7 @@ def mark_for_same_origin_verification! # :doc:
@marked_for_same_origin_verification
=
request
.
get?
end
# If the
`verify_authenticity_token`
before_action ran, verify that
# If the
+verify_authenticity_token+
before_action ran, verify that
# JavaScript responses are only served to same-origin GET requests.
def
marked_for_same_origin_verification?
# :doc:
@marked_for_same_origin_verification
||=
false
...
...
actionpack/lib/action_dispatch/routing/url_for.rb
浏览文件 @
4b8953cc
...
...
@@ -155,7 +155,7 @@ def url_options
# Missing routes keys may be filled in from the current request's parameters
# (e.g. +:controller+, +:action+, +:id+ and any other parameters that are
# placed in the path). Given that the current action has been reached
# through
`GET /users/1`
:
# through
<tt>GET /users/1</tt>
:
#
# url_for(only_path: true) # => '/users/1'
# url_for(only_path: true, action: 'edit') # => '/users/1/edit'
...
...
activerecord/lib/active_record/migration.rb
浏览文件 @
4b8953cc
...
...
@@ -737,8 +737,8 @@ def reversible
# Used to specify an operation that is only run when migrating up
# (for example, populating a new column with its initial values).
#
# In the following example, the new column
`published`
will be given
# the value
`true`
for all existing records.
# In the following example, the new column
+published+
will be given
# the value
+true+
for all existing records.
#
# class AddPublishedToPosts < ActiveRecord::Migration[5.2]
# def change
...
...
activesupport/lib/active_support/cache/redis_cache_store.rb
浏览文件 @
4b8953cc
...
...
@@ -33,9 +33,9 @@ module Cache
# * Fault tolerant. If the Redis server is unavailable, no exceptions are
# raised. Cache fetches are all misses and writes are dropped.
# * Local cache. Hot in-memory primary cache within block/middleware scope.
# *
`read_/write_multi`
support for Redis mget/mset. Use Redis::Distributed
# *
+read_multi+ and +write_multi+
support for Redis mget/mset. Use Redis::Distributed
# 4.0.1+ for distributed mget support.
# *
`delete_matched`
support for Redis KEYS globs.
# *
+delete_matched+
support for Redis KEYS globs.
class
RedisCacheStore
<
Store
# Keys are truncated with their own SHA2 digest if they exceed 1kB
MAX_KEY_BYTESIZE
=
1024
...
...
@@ -143,12 +143,12 @@ def build_redis_client(url:, **redis_options)
# :url Array -> Redis::Distributed.new([{ url: … }, { url: … }, …])
#
# No namespace is set by default. Provide one if the Redis cache
# server is shared with other apps:
`namespace: 'myapp-cache'`
.
# server is shared with other apps:
<tt>namespace: 'myapp-cache'<tt>
.
#
# Compression is enabled by default with a 1kB threshold, so cached
# values larger than 1kB are automatically compressed. Disable by
# passing
`cache: false`
or change the threshold by passing
#
`compress_threshold: 4.kilobytes`
.
# passing
<tt>cache: false</tt>
or change the threshold by passing
#
<tt>compress_threshold: 4.kilobytes</tt>
.
#
# No expiry is set on cache entries by default. Redis is expected to
# be configured with an eviction policy that automatically deletes
...
...
activesupport/lib/active_support/core_ext/array/access.rb
浏览文件 @
4b8953cc
...
...
@@ -35,8 +35,8 @@ def to(position)
# people.without "Aaron", "Todd"
# # => ["David", "Rafael"]
#
# Note: This is an optimization of
`Enumerable#without` that uses `Array#-`
# instead of
`Array#reject`
for performance reasons.
# Note: This is an optimization of
<tt>Enumerable#without</tt> that uses <tt>Array#-</tt>
# instead of
<tt>Array#reject</tt>
for performance reasons.
def
without
(
*
elements
)
self
-
elements
end
...
...
activesupport/lib/active_support/core_ext/date_time/compatibility.rb
浏览文件 @
4b8953cc
...
...
@@ -8,8 +8,8 @@ class DateTime
silence_redefinition_of_method
:to_time
# Either return an instance of
`Time`
with the same UTC offset
# as +self+ or an instance of
`Time`
representing the same time
# Either return an instance of
+Time+
with the same UTC offset
# as +self+ or an instance of
+Time+
representing the same time
# in the the local system timezone depending on the setting of
# on the setting of +ActiveSupport.to_time_preserves_timezone+.
def
to_time
...
...
activesupport/lib/active_support/core_ext/object/with_options.rb
浏览文件 @
4b8953cc
...
...
@@ -62,7 +62,7 @@ class Object
#
# validates :content, length: { minimum: 50 }, if: -> { content.present? }
#
# Hence the inherited default for
`if`
key is ignored.
# Hence the inherited default for
+if+
key is ignored.
#
# NOTE: You cannot call class methods implicitly inside of with_options.
# You can access these methods using the class name instead:
...
...
activesupport/lib/active_support/core_ext/string/inflections.rb
浏览文件 @
4b8953cc
...
...
@@ -174,7 +174,7 @@ def deconstantize
# <%= link_to(@person.name, person_path) %>
# # => <a href="/person/1-donald-e-knuth">Donald E. Knuth</a>
#
# To preserve the case of the characters in a string, use the
`preserve_case`
argument.
# To preserve the case of the characters in a string, use the
+preserve_case+
argument.
#
# class Person
# def to_param
...
...
activesupport/lib/active_support/core_ext/string/output_safety.rb
浏览文件 @
4b8953cc
...
...
@@ -250,7 +250,7 @@ class String
# Marks a string as trusted safe. It will be inserted into HTML with no
# additional escaping performed. It is your responsibility to ensure that the
# string contains no malicious content. This method is equivalent to the
#
`raw` helper in views. It is recommended that you use `sanitize`
instead of
#
+raw+ helper in views. It is recommended that you use +sanitize+
instead of
# this method. It should never be called on user input.
def
html_safe
ActiveSupport
::
SafeBuffer
.
new
(
self
)
...
...
activesupport/lib/active_support/inflector/transliterate.rb
浏览文件 @
4b8953cc
...
...
@@ -73,12 +73,12 @@ def transliterate(string, replacement = "?".freeze)
# parameterize("Donald E. Knuth") # => "donald-e-knuth"
# parameterize("^très|Jolie-- ") # => "tres-jolie"
#
# To use a custom separator, override the
`separator`
argument.
# To use a custom separator, override the
+separator+
argument.
#
# parameterize("Donald E. Knuth", separator: '_') # => "donald_e_knuth"
# parameterize("^très|Jolie__ ", separator: '_') # => "tres_jolie"
#
# To preserve the case of the characters in a string, use the
`preserve_case`
argument.
# To preserve the case of the characters in a string, use the
+preserve_case+
argument.
#
# parameterize("Donald E. Knuth", preserve_case: true) # => "Donald-E-Knuth"
# parameterize("^très|Jolie-- ", preserve_case: true) # => "tres-Jolie"
...
...
activesupport/lib/active_support/message_encryptor.rb
浏览文件 @
4b8953cc
...
...
@@ -58,8 +58,8 @@ module ActiveSupport
# === Rotating keys
#
# MessageEncryptor also supports rotating out old configurations by falling
# back to a stack of encryptors. Call
`rotate`
to build and add an encryptor
# so
`decrypt_and_verify`
will also try the fallback.
# back to a stack of encryptors. Call
+rotate+
to build and add an encryptor
# so
+decrypt_and_verify+
will also try the fallback.
#
# By default any rotated encryptors use the values of the primary
# encryptor unless specified otherwise.
...
...
activesupport/lib/active_support/message_verifier.rb
浏览文件 @
4b8953cc
...
...
@@ -31,7 +31,7 @@ module ActiveSupport
#
# +MessageVerifier+ creates HMAC signatures using SHA1 hash algorithm by default.
# If you want to use a different hash algorithm, you can change it by providing
#
`:digest`
key as an option while initializing the verifier:
#
+:digest+
key as an option while initializing the verifier:
#
# @verifier = ActiveSupport::MessageVerifier.new('s3Krit', digest: 'SHA256')
#
...
...
@@ -78,8 +78,8 @@ module ActiveSupport
# === Rotating keys
#
# MessageVerifier also supports rotating out old configurations by falling
# back to a stack of verifiers. Call
`rotate`
to build and add a verifier to
# so either
`verified` or `verify`
will also try verifying with the fallback.
# back to a stack of verifiers. Call
+rotate+
to build and add a verifier to
# so either
+verified+ or +verify+
will also try verifying with the fallback.
#
# By default any rotated verifiers use the values of the primary
# verifier unless specified otherwise.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录