aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/http
diff options
context:
space:
mode:
authoramitkumarsuroliya <amitkumarsuroliya@gmail.com>2015-09-23 14:38:05 +0530
committeramitkumarsuroliya <amitkumarsuroliya@gmail.com>2015-09-23 14:52:27 +0530
commit96eece6cb4f938ac8d6c88f9c357908836b4bd33 (patch)
tree4ff0afb0c23a68178da44efef9c93f59d89e8591 /actionpack/lib/action_dispatch/http
parent1e9593a37cb9564d85bbb552b08c1084d35523fc (diff)
downloadrails-96eece6cb4f938ac8d6c88f9c357908836b4bd33.tar.gz
rails-96eece6cb4f938ac8d6c88f9c357908836b4bd33.tar.bz2
rails-96eece6cb4f938ac8d6c88f9c357908836b4bd33.zip
Updated Mime Negotiations docs [ci skip]
As we all know that Accessing mime types via constants is deprecated. Now, we are using `Mime::Type[:JSON]` instead of `Mime::JSON`
Diffstat (limited to 'actionpack/lib/action_dispatch/http')
-rw-r--r--actionpack/lib/action_dispatch/http/mime_negotiation.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/http/mime_negotiation.rb b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
index cfb96f5a2d..a966c5e452 100644
--- a/actionpack/lib/action_dispatch/http/mime_negotiation.rb
+++ b/actionpack/lib/action_dispatch/http/mime_negotiation.rb
@@ -10,7 +10,7 @@ module ActionDispatch
self.ignore_accept_header = false
end
- # The MIME type of the HTTP request, such as Mime::XML.
+ # The MIME type of the HTTP request, such as Mime::Type[:XML].
#
# For backward compatibility, the post \format is extracted from the
# X-Post-Data-Format HTTP header if present.
@@ -49,9 +49,9 @@ module ActionDispatch
# Returns the MIME type for the \format used in the request.
#
- # GET /posts/5.xml | request.format => Mime::XML
- # GET /posts/5.xhtml | request.format => Mime::HTML
- # GET /posts/5 | request.format => Mime::HTML or MIME::JS, or request.accepts.first
+ # GET /posts/5.xml | request.format => Mime::Type[:XML]
+ # GET /posts/5.xhtml | request.format => Mime::Type[:HTML]
+ # GET /posts/5 | request.format => Mime::Type[:HTML] or Mime::Type[:JS], or request.accepts.first
#
def format(view_path = [])
formats.first || Mime::NullType.instance