Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
1d6d0cc2
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 搜索 >>
提交
1d6d0cc2
编写于
11月 02, 2014
作者:
R
Robin Dupret
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Tiny documentation styling fixes [ci skip]
上级
26126c85
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
24 addition
and
18 deletion
+24
-18
actionmailer/README.rdoc
actionmailer/README.rdoc
+21
-16
activejob/lib/active_job/queue_adapters.rb
activejob/lib/active_job/queue_adapters.rb
+1
-1
guides/source/asset_pipeline.md
guides/source/asset_pipeline.md
+2
-1
未找到文件。
actionmailer/README.rdoc
浏览文件 @
1d6d0cc2
...
...
@@ -74,14 +74,17 @@ Or you can just chain the methods together like:
== Setting defaults
It is possible to set default values that will be used in every method in your Action Mailer class.
To implement this functionality, you just call the public class method <tt>default</tt> which you get for free from
<tt>ActionMailer::Base</tt>. This method accepts a Hash as the parameter. You can use any of the headers, email messages
have, like <tt>:from</tt> as the key. You can also pass in a string as the key, like "Content-Type", but Action Mailer
does this out of the box for you, so you won't need to worry about that.
Finally, it is also possible to pass in a Proc that will get evaluated when it is needed.
Note that every value you set with this method will get overwritten if you use the same key in your mailer method.
It is possible to set default values that will be used in every method in your
Action Mailer class. To implement this functionality, you just call the public
class method +default+ which you get for free from <tt>ActionMailer::Base</tt>.
This method accepts a Hash as the parameter. You can use any of the headers,
email messages have, like +:from+ as the key. You can also pass in a string as
the key, like "Content-Type", but Action Mailer does this out of the box for you,
so you won't need to worry about that. Finally, it is also possible to pass in a
Proc that will get evaluated when it is needed.
Note that every value you set with this method will get overwritten if you use the
same key in your mailer method.
Example:
...
...
@@ -92,10 +95,11 @@ Example:
== Receiving emails
To receive emails, you need to implement a public instance method called <tt>receive</tt> that takes an
email object as its single parameter. The Action Mailer framework has a corresponding class method,
which is also called <tt>receive</tt>, that accepts a raw, unprocessed email as a string, which it then turns
into the email object and calls the receive instance method.
To receive emails, you need to implement a public instance method called
+receive+ that takes an email object as its single parameter. The Action Mailer
framework has a corresponding class method, which is also called +receive+, that
accepts a raw, unprocessed email as a string, which it then turns into the email
object and calls the receive instance method.
Example:
...
...
@@ -116,13 +120,14 @@ Example:
end
end
This Mailman can be the target for Postfix or other MTAs. In Rails, you would use
the runner in the
trivial case like this:
This Mailman can be the target for Postfix or other MTAs. In Rails, you would use
t
he runner in the t
rivial case like this:
rails runner 'Mailman.receive(STDIN.read)'
However, invoking Rails in the runner for each mail to be received is very resource intensive. A single
instance of Rails should be run within a daemon, if it is going to process more than just a limited amount of email.
However, invoking Rails in the runner for each mail to be received is very
resource intensive. A single instance of Rails should be run within a daemon, if
it is going to process more than just a limited amount of email.
== Configuration
...
...
activejob/lib/active_job/queue_adapters.rb
浏览文件 @
1d6d0cc2
...
...
@@ -13,7 +13,7 @@ module ActiveJob
# * {Sneakers}[https://github.com/jondot/sneakers]
# * {Sucker Punch}[https://github.com/brandonhilkert/sucker_punch]
#
#
####
Backends Features
#
===
Backends Features
#
# | | Async | Queues | Delayed | Priorities | Timeout | Retries |
# |-------------------|-------|--------|-----------|------------|---------|---------|
...
...
guides/source/asset_pipeline.md
浏览文件 @
1d6d0cc2
...
...
@@ -1347,7 +1347,8 @@ config.assets.digest = true
Rails 4 no longer sets default config values for Sprockets in
`test.rb`
, so
`test.rb`
now requires Sprockets configuration. The old defaults in the test
environment are:
`config.assets.compile = true`
,
`config.assets.compress = false`
,
`config.assets.debug = false`
and
`config.assets.digest = false`
.
environment are:
`config.assets.compile = true`
,
`config.assets.compress = false`
,
`config.assets.debug = false`
and
`config.assets.digest = false`
.
The following should also be added to
`Gemfile`
:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录