Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
96742b5e
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,发现更多精彩内容 >>
提交
96742b5e
编写于
8月 30, 2017
作者:
R
Ryuta Kamizono
提交者:
GitHub
8月 30, 2017
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #30457 from yhirano55/update_action_mailer_doc
Update Action Mailer doc [ci skip]
上级
711dd229
413bb9bd
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
8 addition
and
8 deletion
+8
-8
actionmailer/lib/action_mailer/base.rb
actionmailer/lib/action_mailer/base.rb
+3
-3
actionmailer/lib/action_mailer/message_delivery.rb
actionmailer/lib/action_mailer/message_delivery.rb
+1
-1
actionmailer/lib/action_mailer/preview.rb
actionmailer/lib/action_mailer/preview.rb
+4
-4
未找到文件。
actionmailer/lib/action_mailer/base.rb
浏览文件 @
96742b5e
...
...
@@ -59,7 +59,7 @@ module ActionMailer
# The hash passed to the mail method allows you to specify any header that a <tt>Mail::Message</tt>
# will accept (any valid email header including optional fields).
#
# The
mail
method, if not passed a block, will inspect your views and send all the views with
# The
+mail+
method, if not passed a block, will inspect your views and send all the views with
# the same name as the method, so the above action would send the +welcome.text.erb+ view
# file as well as the +welcome.html.erb+ view file in a +multipart/alternative+ email.
#
...
...
@@ -138,7 +138,7 @@ module ActionMailer
# You can also define a <tt>default_url_options</tt> method on individual mailers to override these
# default settings per-mailer.
#
# By default when <tt>config.force_ssl</tt> is
true
, URLs generated for hosts will use the HTTPS protocol.
# By default when <tt>config.force_ssl</tt> is
+true+
, URLs generated for hosts will use the HTTPS protocol.
#
# = Sending mail
#
...
...
@@ -316,7 +316,7 @@ module ActionMailer
#
# = Callbacks
#
# You can specify callbacks using
before_action and after_action
for configuring your messages.
# You can specify callbacks using
<tt>before_action</tt> and <tt>after_action</tt>
for configuring your messages.
# This may be useful, for example, when you want to add default inline attachments for all
# messages sent out by a certain mailer class:
#
...
...
actionmailer/lib/action_mailer/message_delivery.rb
浏览文件 @
96742b5e
...
...
@@ -4,7 +4,7 @@
module
ActionMailer
# The <tt>ActionMailer::MessageDelivery</tt> class is used by
#
<tt>ActionMailer::Base</tt>
when creating a new mailer.
#
ActionMailer::Base
when creating a new mailer.
# <tt>MessageDelivery</tt> is a wrapper (+Delegator+ subclass) around a lazy
# created <tt>Mail::Message</tt>. You can get direct access to the
# <tt>Mail::Message</tt>, deliver the email or schedule the email to be sent
...
...
actionmailer/lib/action_mailer/preview.rb
浏览文件 @
96742b5e
...
...
@@ -17,7 +17,7 @@ module Previews #:nodoc:
#
# config.action_mailer.show_previews = true
#
# Defaults to
true
for development environment
# Defaults to
+true+
for development environment
#
mattr_accessor
:show_previews
,
instance_writer:
false
...
...
@@ -33,7 +33,7 @@ def register_preview_interceptors(*interceptors)
# Register an Interceptor which will be called before mail is previewed.
# Either a class or a string can be passed in as the Interceptor. If a
# string is passed in it will be
<tt>constantize</tt>
d.
# string is passed in it will be
constantize
d.
def
register_preview_interceptor
(
interceptor
)
preview_interceptor
=
\
case
interceptor
...
...
@@ -81,12 +81,12 @@ def emails
public_instance_methods
(
false
).
map
(
&
:to_s
).
sort
end
# Returns
true
if the email exists.
# Returns
+true+
if the email exists.
def
email_exists?
(
email
)
emails
.
include?
(
email
)
end
# Returns
true
if the preview exists.
# Returns
+true+
if the preview exists.
def
exists?
(
preview
)
all
.
any?
{
|
p
|
p
.
preview_name
==
preview
}
end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录