diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2017-06-13 20:47:37 +0900 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-13 20:47:37 +0900 |
commit | db7398f79f4dc30cefd6310b538073ec4a2574cc (patch) | |
tree | 6b3dafe69bcc938b31803b9a372f21f274c8ead4 /actionpack/lib | |
parent | 42a80721938453a2ecbba204ce21a0d496756178 (diff) | |
parent | 62913e4c25f4a76d5d3e764fef0e923fbe6ec29e (diff) | |
download | rails-db7398f79f4dc30cefd6310b538073ec4a2574cc.tar.gz rails-db7398f79f4dc30cefd6310b538073ec4a2574cc.tar.bz2 rails-db7398f79f4dc30cefd6310b538073ec4a2574cc.zip |
Merge pull request #29435 from y-yagi/fix_formatting_of_action_dispatch
Fix formatting of AD::FileHandler and AD::Static doc [ci skip]
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_dispatch/middleware/static.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/actionpack/lib/action_dispatch/middleware/static.rb b/actionpack/lib/action_dispatch/middleware/static.rb index 5d10129d21..fb99f13a1c 100644 --- a/actionpack/lib/action_dispatch/middleware/static.rb +++ b/actionpack/lib/action_dispatch/middleware/static.rb @@ -6,11 +6,11 @@ module ActionDispatch # When initialized, it can accept optional HTTP headers, which will be set # when a response containing a file's contents is delivered. # - # This middleware will render the file specified in `env["PATH_INFO"]` + # This middleware will render the file specified in <tt>env["PATH_INFO"]</tt> # where the base path is in the +root+ directory. For example, if the +root+ - # is set to `public/`, then a request with `env["PATH_INFO"]` of - # `assets/application.js` will return a response with the contents of a file - # located at `public/assets/application.js` if the file exists. If the file + # is set to +public/+, then a request with <tt>env["PATH_INFO"]</tt> of + # +assets/application.js+ will return a response with the contents of a file + # located at +public/assets/application.js+ if the file exists. If the file # does not exist, a 404 "File not Found" response will be returned. class FileHandler def initialize(root, index: "index", headers: {}) @@ -23,8 +23,8 @@ module ActionDispatch # correct read permissions, the return value is a URI-escaped string # representing the filename. Otherwise, false is returned. # - # Used by the `Static` class to check the existence of a valid file - # in the server's `public/` directory (see Static#call). + # Used by the +Static+ class to check the existence of a valid file + # in the server's +public/+ directory (see Static#call). def match?(path) path = ::Rack::Utils.unescape_path path return false unless ::Rack::Utils.valid_path? path @@ -99,7 +99,7 @@ module ActionDispatch # This middleware will attempt to return the contents of a file's body from # disk in the response. If a file is not found on disk, the request will be # delegated to the application stack. This middleware is commonly initialized - # to serve assets from a server's `public/` directory. + # to serve assets from a server's +public/+ directory. # # This middleware verifies the path to ensure that only files # living in the root directory can be rendered. A request cannot |