Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
49542ae8
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 搜索 >>
提交
49542ae8
编写于
1月 11, 2018
作者:
J
James Lovejoy
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fix typos, update documentation
[ci skip]
上级
c09ebcf4
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
33 addition
and
27 deletion
+33
-27
actionmailer/lib/action_mailer/inline_preview_interceptor.rb
actionmailer/lib/action_mailer/inline_preview_interceptor.rb
+1
-1
actionpack/lib/action_controller/metal/force_ssl.rb
actionpack/lib/action_controller/metal/force_ssl.rb
+2
-2
actionview/lib/action_view/helpers/asset_tag_helper.rb
actionview/lib/action_view/helpers/asset_tag_helper.rb
+21
-15
actionview/lib/action_view/helpers/asset_url_helper.rb
actionview/lib/action_view/helpers/asset_url_helper.rb
+6
-6
actionview/lib/action_view/helpers/form_helper.rb
actionview/lib/action_view/helpers/form_helper.rb
+3
-3
未找到文件。
actionmailer/lib/action_mailer/inline_preview_interceptor.rb
浏览文件 @
49542ae8
...
...
@@ -4,7 +4,7 @@
module
ActionMailer
# Implements a mailer preview interceptor that converts image tag src attributes
# that use inline cid: style
urls to data: style url
s so that they are visible
# that use inline cid: style
URLs to data: style URL
s so that they are visible
# when previewing an HTML email in a web browser.
#
# This interceptor is enabled by default. To disable it, delete it from the
...
...
actionpack/lib/action_controller/metal/force_ssl.rb
浏览文件 @
49542ae8
...
...
@@ -39,7 +39,7 @@ module ClassMethods
# end
#
# ==== URL Options
# You can pass any of the following options to affect the redirect
url
# You can pass any of the following options to affect the redirect
URL
# * <tt>host</tt> - Redirect to a different host name
# * <tt>subdomain</tt> - Redirect to a different subdomain
# * <tt>domain</tt> - Redirect to a different domain
...
...
@@ -73,7 +73,7 @@ def force_ssl(options = {})
# Redirect the existing request to use the HTTPS protocol.
#
# ==== Parameters
# * <tt>host_or_options</tt> - Either a host name or any of the
url
and
# * <tt>host_or_options</tt> - Either a host name or any of the
URL
and
# redirect options available to the <tt>force_ssl</tt> method.
def
force_ssl_redirect
(
host_or_options
=
nil
)
unless
request
.
ssl?
...
...
actionview/lib/action_view/helpers/asset_tag_helper.rb
浏览文件 @
49542ae8
...
...
@@ -47,11 +47,11 @@ module AssetTagHelper
# When the last parameter is a hash you can add HTML attributes using that
# parameter. The following options are supported:
#
# * <tt>:extname</tt> - Append an extension to the generated
url
unless the extension
# already exists. This only applies for relative
url
s.
# * <tt>:protocol</tt> - Sets the protocol of the generated
url, t
his option only
# applies when a relative
url
and +host+ options are provided.
# * <tt>:host</tt> - When a relative
url
is provided the host is added to the
# * <tt>:extname</tt> - Append an extension to the generated
URL
unless the extension
# already exists. This only applies for relative
URL
s.
# * <tt>:protocol</tt> - Sets the protocol of the generated
URL. T
his option only
# applies when a relative
URL
and +host+ options are provided.
# * <tt>:host</tt> - When a relative
URL
is provided the host is added to the
# that path.
# * <tt>:skip_pipeline</tt> - This option is used to bypass the asset pipeline
# when it is set to true.
...
...
@@ -224,8 +224,8 @@ def favicon_link_tag(source = "favicon.ico", options = {})
end
# Returns a link tag that browsers can use to preload the +source+.
# The +source+ can be the path of a
n
resource managed by asset pipeline,
# a full path or an URI.
# The +source+ can be the path of a resource managed by asset pipeline,
# a full path
,
or an URI.
#
# ==== Options
#
...
...
@@ -285,7 +285,7 @@ def preload_link_tag(source, options = {})
end
# Returns an HTML image tag for the +source+. The +source+ can be a full
# path, a file or an Active Storage attachment.
# path, a file
,
or an Active Storage attachment.
#
# ==== Options
#
...
...
@@ -373,12 +373,13 @@ def image_alt(src)
# Returns an HTML video tag for the +sources+. If +sources+ is a string,
# a single video tag will be returned. If +sources+ is an array, a video
# tag with nested source tags for each source will be returned. The
# +sources+ can be full paths or files that exist
s
in your public videos
# +sources+ can be full paths or files that exist in your public videos
# directory.
#
# ==== Options
# You can add HTML attributes using the +options+. The +options+ supports
# two additional keys for convenience and conformance:
#
# When the last parameter is a hash you can add HTML attributes using that
# parameter. The following options are supported:
#
# * <tt>:poster</tt> - Set an image (like a screenshot) to be shown
# before the video loads. The path is calculated like the +src+ of +image_tag+.
...
...
@@ -395,7 +396,7 @@ def image_alt(src)
# video_tag("trailer.ogg")
# # => <video src="/videos/trailer.ogg"></video>
# video_tag("trailer.ogg", controls: true, preload: 'none')
# # => <video preload="none" controls="controls" src="/videos/trailer.ogg"
></video>
# # => <video preload="none" controls="controls" src="/videos/trailer.ogg"></video>
# video_tag("trailer.m4v", size: "16x10", poster: "screenshot.png")
# # => <video src="/videos/trailer.m4v" width="16" height="10" poster="/assets/screenshot.png"></video>
# video_tag("trailer.m4v", size: "16x10", poster: "screenshot.png", poster_skip_pipeline: true)
...
...
@@ -422,9 +423,14 @@ def video_tag(*sources)
end
end
# Returns an HTML audio tag for the +source+.
# The +source+ can be full path or file that exists in
# your public audios directory.
# Returns an HTML audio tag for the +sources+. If +sources+ is a string,
# a single audio tag will be returned. If +sources+ is an array, an audio
# tag with nested source tags for each source will be returned. The
# +sources+ can be full paths or files that exist in your public audios
# directory.
#
# When the last parameter is a hash you can add HTML attributes using that
# parameter.
#
# audio_tag("sound")
# # => <audio src="/audios/sound"></audio>
...
...
actionview/lib/action_view/helpers/asset_url_helper.rb
浏览文件 @
49542ae8
...
...
@@ -6,7 +6,7 @@ module ActionView
# = Action View Asset URL Helpers
module
Helpers
#:nodoc:
# This module provides methods for generating asset paths and
#
url
s.
#
URL
s.
#
# image_path("rails.png")
# # => "/assets/rails.png"
...
...
@@ -57,8 +57,8 @@ module Helpers #:nodoc:
# You can read more about setting up your DNS CNAME records from your ISP.
#
# Note: This is purely a browser performance optimization and is not meant
# for server load balancing. See http://www.die.net/musings/page_load_time/
# for background and http://www.browserscope.org/?category=network for
# for server load balancing. See http
s
://www.die.net/musings/page_load_time/
# for background and http
s
://www.browserscope.org/?category=network for
# connection limit data.
#
# Alternatively, you can exert more control over the asset host by setting
...
...
@@ -97,7 +97,7 @@ module Helpers #:nodoc:
# still sending assets for plain HTTP requests from asset hosts. If you don't
# have SSL certificates for each of the asset hosts this technique allows you
# to avoid warnings in the client about mixed media.
# Note that the
request
parameter might not be supplied, e.g. when the assets
# Note that the
+request+
parameter might not be supplied, e.g. when the assets
# are precompiled via a Rake task. Make sure to use a +Proc+ instead of a lambda,
# since a +Proc+ allows missing parameters and sets them to +nil+.
#
...
...
@@ -149,13 +149,13 @@ module AssetUrlHelper
# Below lists scenarios that apply to +asset_path+ whether or not you're
# using the asset pipeline.
#
# - All fully qualified
url
s are returned immediately. This bypasses the
# - All fully qualified
URL
s are returned immediately. This bypasses the
# asset pipeline and all other behavior described.
#
# asset_path("http://www.example.com/js/xmlhr.js") # => "http://www.example.com/js/xmlhr.js"
#
# - All assets that begin with a forward slash are assumed to be full
#
url
s and will not be expanded. This will bypass the asset pipeline.
#
URL
s and will not be expanded. This will bypass the asset pipeline.
#
# asset_path("/foo.png") # => "/foo.png"
#
...
...
actionview/lib/action_view/helpers/form_helper.rb
浏览文件 @
49542ae8
...
...
@@ -19,7 +19,7 @@ module Helpers #:nodoc:
# compared to using vanilla HTML.
#
# Typically, a form designed to create or update a resource reflects the
# identity of the resource in several ways: (i) the
url
that the form is
# identity of the resource in several ways: (i) the
URL
that the form is
# sent to (the form element's +action+ attribute) should result in a request
# being routed to the appropriate controller action (with the appropriate <tt>:id</tt>
# parameter in the case of an existing resource), (ii) input fields should
...
...
@@ -166,7 +166,7 @@ module FormHelper
# So for example you may use a named route directly. When the model is
# represented by a string or symbol, as in the example above, if the
# <tt>:url</tt> option is not specified, by default the form will be
# sent back to the current
url
(We will describe below an alternative
# sent back to the current
URL
(We will describe below an alternative
# resource-oriented usage of +form_for+ in which the URL does not need
# to be specified explicitly).
# * <tt>:namespace</tt> - A namespace for your form to ensure uniqueness of
...
...
@@ -608,7 +608,7 @@ def apply_form_for_options!(record, object, options) #:nodoc:
# This is helpful when fragment-caching the form. Remote forms
# get the authenticity token from the <tt>meta</tt> tag, so embedding is
# unnecessary unless you support browsers without JavaScript.
# * <tt>:local</tt> - By default form submits are remote and unob
s
trusive XHRs.
# * <tt>:local</tt> - By default form submits are remote and unobtrusive XHRs.
# Disable remote submits with <tt>local: true</tt>.
# * <tt>:skip_enforcing_utf8</tt> - By default a hidden field named +utf8+
# is output to enforce UTF-8 submits. Set to true to skip the field.
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录