Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
f839e619
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 搜索 >>
提交
f839e619
编写于
10月 10, 2012
作者:
R
Robin Dupret
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Use a 1.9 Hash syntax in README files (fixes thanks to @vijaydev)
上级
b12d0480
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
9 addition
and
9 deletion
+9
-9
actionmailer/README.rdoc
actionmailer/README.rdoc
+8
-8
activemodel/README.rdoc
activemodel/README.rdoc
+1
-1
未找到文件。
actionmailer/README.rdoc
浏览文件 @
f839e619
...
...
@@ -83,7 +83,7 @@ Note that every value you set with this method will get over written if you use
Example:
class AuthenticationMailer < ActionMailer::Base
default
:from => "awesome@application.com", :subject =>
Proc.new { "E-mail was generated at #{Time.now}" }
default
from: "awesome@application.com", subject:
Proc.new { "E-mail was generated at #{Time.now}" }
.....
end
...
...
@@ -100,13 +100,13 @@ Example:
def receive(email)
page = Page.find_by_address(email.to.first)
page.emails.create(
:subject => email.subject, :body =>
email.body
subject: email.subject, body:
email.body
)
if email.has_attachments?
email.attachments.each do |attachment|
page.attachments.create({
:file => attachment, :description =>
email.subject
file: attachment, description:
email.subject
})
end
end
...
...
@@ -127,11 +127,11 @@ a limited number of email.
The Base class has the full list of configuration options. Here's an example:
ActionMailer::Base.smtp_settings = {
:address =>
'smtp.yourserver.com', # default: localhost
:port =>
'25', # default: 25
:user_name =>
'user',
:password =>
'pass',
:authentication =>
:plain # :plain, :login or :cram_md5
address:
'smtp.yourserver.com', # default: localhost
port:
'25', # default: 25
user_name:
'user',
password:
'pass',
authentication:
:plain # :plain, :login or :cram_md5
}
...
...
activemodel/README.rdoc
浏览文件 @
f839e619
...
...
@@ -23,7 +23,7 @@ to integrate with Action Pack out of the box: <tt>ActiveModel::Model</tt>.
validates_presence_of :name
end
person = Person.new(
:name => 'bob', :age =>
'18')
person = Person.new(
name: 'bob', age:
'18')
person.name # => 'bob'
person.age # => '18'
person.valid? # => true
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录