Skip to content

Commit

Permalink
Update Docs in favor to use render plain instead of text option
Browse files Browse the repository at this point in the history
ref #14062
  • Loading branch information
robertomiranda committed Feb 18, 2014
1 parent 5dc6bf5 commit e220a34
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions actionmailer/lib/action_mailer/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:

This comment has been minimized.

Copy link
@laserlemon

laserlemon Mar 2, 2014

Contributor

Hasty search/replace ☝️

This comment has been minimized.

Copy link
@arthurnn

arthurnn Mar 2, 2014

Member

yep. good catch. that has been fixed on 1c248df

This comment has been minimized.

Copy link
@laserlemon

laserlemon Mar 2, 2014

Contributor

Thank you!

#
# 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
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_controller/metal/data_streaming.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
12 changes: 6 additions & 6 deletions actionpack/lib/action_controller/metal/http_authentication.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
#
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit e220a34

Please sign in to comment.