1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Use tt in doc for ActionPack [ci skip]

This commit is contained in:
Yoshiyuki Hirano 2017-08-26 15:30:39 +09:00
parent 14c1a9c5e3
commit 8c5ab21b25
8 changed files with 17 additions and 17 deletions

View file

@ -22,7 +22,7 @@ module ActionController #:nodoc:
# Since HTML and JavaScript requests are typically made from the browser, we
# need to ensure to verify request authenticity for the web browser. We can
# use session-oriented authentication for these types of requests, by using
# the `protect_from_forgery` method in our controllers.
# the <tt>protect_from_forgery</tt> method in our controllers.
#
# GET requests are not protected since they don't have side effects like writing
# to the database and don't leak sensitive information. JavaScript requests are

View file

@ -1,7 +1,7 @@
# frozen_string_literal: true
module ActionController #:nodoc:
# This module is responsible for providing `rescue_from` helpers
# This module is responsible for providing +rescue_from+ helpers
# to controllers and configuring when detailed exceptions must be
# shown.
module Rescue
@ -10,8 +10,8 @@ module ActionController #:nodoc:
# Override this method if you want to customize when detailed
# exceptions must be shown. This method is only called when
# consider_all_requests_local is false. By default, it returns
# false, but someone may set it to `request.local?` so local
# +consider_all_requests_local+ is +false+. By default, it returns
# +false+, but someone may set it to <tt>request.local?</tt> so local
# requests in production still show the detailed exception pages.
def show_detailed_exceptions?
false

View file

@ -97,7 +97,7 @@ module ActionDispatch
# support strong ETags and will ignore weak ETags entirely.
#
# Weak ETags are what we almost always need, so they're the default.
# Check out `#strong_etag=` to provide a strong ETag validator.
# Check out #strong_etag= to provide a strong ETag validator.
def etag=(weak_validators)
self.weak_etag = weak_validators
end

View file

@ -2,12 +2,12 @@
module ActionDispatch
# When called, this middleware renders an error page. By default if an HTML
# response is expected it will render static error pages from the `/public`
# response is expected it will render static error pages from the <tt>/public</tt>
# directory. For example when this middleware receives a 500 response it will
# render the template found in `/public/500.html`.
# render the template found in <tt>/public/500.html</tt>.
# If an internationalized locale is set, this middleware will attempt to render
# the template in `/public/500.<locale>.html`. If an internationalized template
# is not found it will fall back on `/public/500.html`.
# the template in <tt>/public/500.<locale>.html</tt>. If an internationalized template
# is not found it will fall back on <tt>/public/500.html</tt>.
#
# When a request with a content type other than HTML is made, this middleware
# will attempt to convert error information into the appropriate response type.

View file

@ -29,16 +29,16 @@ module ActionDispatch
# be encrypted, and signed cookies generated by Rails 3 will be
# transparently read and encrypted to provide a smooth upgrade path.
#
# Configure your session store in config/initializers/session_store.rb:
# Configure your session store in <tt>config/initializers/session_store.rb</tt>:
#
# Rails.application.config.session_store :cookie_store, key: '_your_app_session'
#
# Configure your secret key in config/secrets.yml:
# Configure your secret key in <tt>config/secrets.yml</tt>:
#
# development:
# secret_key_base: 'secret key'
#
# To generate a secret key for an existing application, run `rails secret`.
# To generate a secret key for an existing application, run <tt>rails secret</tt>.
#
# If you are upgrading an existing Rails 3 app, you should leave your
# existing secret_token in place and simply add the new secret_key_base.

View file

@ -142,7 +142,7 @@ module ActionDispatch
# get "/stories" => redirect("/posts")
#
# This will redirect the user, while ignoring certain parts of the request, including query string, etc.
# `/stories`, `/stories?foo=bar`, etc all redirect to `/posts`.
# <tt>/stories</tt>, <tt>/stories?foo=bar</tt>, etc all redirect to <tt>/posts</tt>.
#
# You can also use interpolation in the supplied redirect argument:
#
@ -175,8 +175,8 @@ module ActionDispatch
# get '/stories', to: redirect(path: '/posts')
#
# This will redirect the user, while changing only the specified parts of the request,
# for example the `path` option in the last example.
# `/stories`, `/stories?foo=bar`, redirect to `/posts` and `/posts?foo=bar` respectively.
# for example the +path+ option in the last example.
# <tt>/stories</tt>, <tt>/stories?foo=bar</tt>, redirect to <tt>/posts</tt> and <tt>/posts?foo=bar</tt> respectively.
#
# Finally, an object which responds to call can be supplied to redirect, allowing you to reuse
# common redirect routes. The call method must accept two arguments, params and request, and return

View file

@ -109,7 +109,7 @@ module ActionDispatch
end
# Hook overridden in controller to add request information
# with `default_url_options`. Application logic should not
# with +default_url_options+. Application logic should not
# go into url_options.
def url_options
default_url_options

View file

@ -11,7 +11,7 @@ module ActionDispatch
"HTTP_USER_AGENT" => "Rails Testing",
)
# Create a new test request with default `env` values.
# Create a new test request with default +env+ values.
def self.create(env = {})
env = Rails.application.env_config.merge(env) if defined?(Rails.application) && Rails.application
env["rack.request.cookie_hash"] ||= {}.with_indifferent_access