Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
张重言
rails
提交
e220a34e
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,发现更多精彩内容 >>
提交
e220a34e
编写于
2月 18, 2014
作者:
R
robertomiranda
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Update Docs in favor to use render plain instead of text option
ref #14062
上级
5dc6bf5f
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
11 addition
and
11 deletion
+11
-11
actionmailer/lib/action_mailer/base.rb
actionmailer/lib/action_mailer/base.rb
+3
-3
actionpack/lib/action_controller/base.rb
actionpack/lib/action_controller/base.rb
+1
-1
actionpack/lib/action_controller/metal/data_streaming.rb
actionpack/lib/action_controller/metal/data_streaming.rb
+1
-1
actionpack/lib/action_controller/metal/http_authentication.rb
...onpack/lib/action_controller/metal/http_authentication.rb
+6
-6
未找到文件。
actionmailer/lib/action_mailer/base.rb
浏览文件 @
e220a34e
...
...
@@ -724,11 +724,11 @@ def attachments
# format.html
# end
#
# You can even render
text
directly without using a template:
# You can even render
plain
directly without using a template:
#
# mail(to: 'mikel@test.lindsaar.net') do |format|
# format.text { render
text
: "Hello Mikel!" }
# format.html { render
text
: "<h1>Hello Mikel!</h1>" }
# format.text { render
plain
: "Hello Mikel!" }
# format.html { render
plain
: "<h1>Hello Mikel!</h1>" }
# end
#
# Which will render a +multipart/alternative+ email with +text/plain+ and
...
...
actionpack/lib/action_controller/base.rb
浏览文件 @
e220a34e
...
...
@@ -45,7 +45,7 @@ module ActionController
#
# def server_ip
# location = request.env["SERVER_ADDR"]
# render
text
: "This server hosted at #{location}"
# render
plain
: "This server hosted at #{location}"
# end
#
# == Parameters
...
...
actionpack/lib/action_controller/metal/data_streaming.rb
浏览文件 @
e220a34e
...
...
@@ -96,7 +96,7 @@ def each
end
# Sends the given binary data to the browser. This method is similar to
# <tt>render
text
: data</tt>, but also allows you to specify whether
# <tt>render
plain
: data</tt>, but also allows you to specify whether
# the browser should display the response as a file attachment (i.e. in a
# download dialog) or as inline data. You may also set the content type,
# the apparent file name, and other things.
...
...
actionpack/lib/action_controller/metal/http_authentication.rb
浏览文件 @
e220a34e
...
...
@@ -11,11 +11,11 @@ module HttpAuthentication
# http_basic_authenticate_with name: "dhh", password: "secret", except: :index
#
# def index
# render
text
: "Everyone can see me!"
# render
plain
: "Everyone can see me!"
# end
#
# def edit
# render
text
: "I'm only accessible if you know the password"
# render
plain
: "I'm only accessible if you know the password"
# end
# end
#
...
...
@@ -127,11 +127,11 @@ def authentication_request(controller, realm)
# before_action :authenticate, except: [:index]
#
# def index
# render
text
: "Everyone can see me!"
# render
plain
: "Everyone can see me!"
# end
#
# def edit
# render
text
: "I'm only accessible if you know the password"
# render
plain
: "I'm only accessible if you know the password"
# end
#
# private
...
...
@@ -321,11 +321,11 @@ def opaque(secret_key)
# before_action :authenticate, except: [ :index ]
#
# def index
# render
text
: "Everyone can see me!"
# render
plain
: "Everyone can see me!"
# end
#
# def edit
# render
text
: "I'm only accessible if you know the password"
# render
plain
: "I'm only accessible if you know the password"
# end
#
# private
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录