Skip to content

Commit

Permalink
Merge pull request #30418 from yhirano55/use_tt_in_doc_for_actionpack
Browse files Browse the repository at this point in the history
Use tt in doc for action_pack [ci skip]
  • Loading branch information
kamipo committed Aug 26, 2017
2 parents 494fd77 + 8c5ab21 commit 7a9b938
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class InvalidCrossOriginRequest < ActionControllerError #: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
Expand Down
6 changes: 3 additions & 3 deletions actionpack/lib/action_controller/metal/rescue.rb
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -10,8 +10,8 @@ module Rescue

# 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
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/http/cache.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def date=(utc_time)
# 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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,16 @@ module Session
# 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.
Expand Down
6 changes: 3 additions & 3 deletions actionpack/lib/action_dispatch/routing/redirection.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ module Redirection
# 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:
#
Expand Down Expand Up @@ -175,8 +175,8 @@ module Redirection
# 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
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/routing/url_for.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def initialize(*)
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
Expand Down
2 changes: 1 addition & 1 deletion actionpack/lib/action_dispatch/testing/test_request.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class TestRequest < Request
"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
Expand Down

0 comments on commit 7a9b938

Please sign in to comment.