Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
8659212d
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,发现更多精彩内容 >>
提交
8659212d
编写于
11月 08, 2012
作者:
A
AvnerCohen
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Actionmailer to 1.9 hash syntax
上级
01c7a1e7
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
9 addition
and
9 deletion
+9
-9
actionmailer/lib/action_mailer/base.rb
actionmailer/lib/action_mailer/base.rb
+9
-9
未找到文件。
actionmailer/lib/action_mailer/base.rb
浏览文件 @
8659212d
...
@@ -70,7 +70,7 @@ module ActionMailer
...
@@ -70,7 +70,7 @@ module ActionMailer
# The block syntax is also useful in providing information specific to a part:
# The block syntax is also useful in providing information specific to a part:
#
#
# mail(to: user.email) do |format|
# mail(to: user.email) do |format|
# format.text(
:content_transfer_encoding =>
"base64")
# format.text(
content_transfer_encoding:
"base64")
# format.html
# format.html
# end
# end
#
#
...
@@ -129,12 +129,12 @@ module ActionMailer
...
@@ -129,12 +129,12 @@ module ActionMailer
# It is also possible to set a default host that will be used in all mailers by setting the <tt>:host</tt>
# It is also possible to set a default host that will be used in all mailers by setting the <tt>:host</tt>
# option as a configuration option in <tt>config/application.rb</tt>:
# option as a configuration option in <tt>config/application.rb</tt>:
#
#
# config.action_mailer.default_url_options = {
:host =>
"example.com" }
# config.action_mailer.default_url_options = {
host:
"example.com" }
#
#
# When you decide to set a default <tt>:host</tt> for your mailers, then you need to make sure to use the
# When you decide to set a default <tt>:host</tt> for your mailers, then you need to make sure to use the
# <tt>
:only_path =>
false</tt> option when using <tt>url_for</tt>. Since the <tt>url_for</tt> view helper
# <tt>
only_path:
false</tt> option when using <tt>url_for</tt>. Since the <tt>url_for</tt> view helper
# will generate relative URLs by default when a <tt>:host</tt> option isn't explicitly provided, passing
# will generate relative URLs by default when a <tt>:host</tt> option isn't explicitly provided, passing
# <tt>
:only_path =>
false</tt> will ensure that absolute URLs are generated.
# <tt>
only_path:
false</tt> will ensure that absolute URLs are generated.
#
#
# = Sending mail
# = Sending mail
#
#
...
@@ -246,10 +246,10 @@ module ActionMailer
...
@@ -246,10 +246,10 @@ module ActionMailer
# You can pass in any header value that a <tt>Mail::Message</tt> accepts. Out of the box,
# You can pass in any header value that a <tt>Mail::Message</tt> accepts. Out of the box,
# <tt>ActionMailer::Base</tt> sets the following:
# <tt>ActionMailer::Base</tt> sets the following:
#
#
# * <tt>
:mime_version =>
"1.0"</tt>
# * <tt>
mime_version:
"1.0"</tt>
# * <tt>
:charset =>
"UTF-8",</tt>
# * <tt>
charset:
"UTF-8",</tt>
# * <tt>
:content_type =>
"text/plain",</tt>
# * <tt>
content_type:
"text/plain",</tt>
# * <tt>
:parts_order =>
[ "text/plain", "text/enriched", "text/html" ]</tt>
# * <tt>
parts_order:
[ "text/plain", "text/enriched", "text/html" ]</tt>
#
#
# <tt>parts_order</tt> and <tt>charset</tt> are not actually valid <tt>Mail::Message</tt> header fields,
# <tt>parts_order</tt> and <tt>charset</tt> are not actually valid <tt>Mail::Message</tt> header fields,
# but Action Mailer translates them appropriately and sets the correct values.
# but Action Mailer translates them appropriately and sets the correct values.
...
@@ -665,7 +665,7 @@ def attachments
...
@@ -665,7 +665,7 @@ def attachments
#
#
# The block syntax also allows you to customize the part headers if desired:
# The block syntax also allows you to customize the part headers if desired:
#
#
# mail(
:to =>
'mikel@test.lindsaar.net') do |format|
# mail(
to:
'mikel@test.lindsaar.net') do |format|
# format.text(content_transfer_encoding: "base64")
# format.text(content_transfer_encoding: "base64")
# format.html
# format.html
# end
# end
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录