From 7611fa6d469cef9accabe6bb5e7e95914756322a Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sat, 2 Dec 2006 23:07:04 +0000 Subject: Added Request#format to return the format used for the request as a mime type. If no format is specified, the first Request#accepts type is used. This means you can stop using respond_to for anything else than responses [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'actionpack/CHANGELOG') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index e2ef473fdd..072ca4a865 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,11 @@ *SVN* +* Added Request#format to return the format used for the request as a mime type. If no format is specified, the first Request#accepts type is used. This means you can stop using respond_to for anything else than responses [DHH]. Examples: + + GET /posts/5.xml | request.format => Mime::XML + GET /posts/5.xhtml | request.format => Mime::HTML + GET /posts/5 | request.format => request.accepts.first (usually Mime::HTML for browsers) + * Added the option for extension aliases to mime type registration [DHH]. Example (already in the default routes): Mime::Type.register "text/html", :html, %w( application/xhtml+xml ), %w( xhtml ) -- cgit v1.2.3