From caa8a005202b267b75baf521d5f613f3a2bce600 Mon Sep 17 00:00:00 2001 From: David Heinemeier Hansson Date: Sun, 17 Sep 2006 18:10:25 +0000 Subject: Added that respond_to blocks will automatically set the content type to be the same as is requested [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5131 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionpack/CHANGELOG | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'actionpack/CHANGELOG') diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index f8d4057df5..c91a0dcde7 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,13 @@ *SVN* +* Added that respond_to blocks will automatically set the content type to be the same as is requested [DHH]. Examples: + + respond_to do |format| + format.html { render :text => "I'm being sent as text/html" } + format.rss { render :text => "I'm being sent as application/rss+xml" } + format.atom { render :text => "I'm being sent as application/xml", :content_type => Mime::XML } + end + * Added utf-8 as the default charset for all renders. You can change this default using ActionController::Base.default_charset=(encoding) [DHH] * Added proper getters and setters for content type and charset [DHH]. Example of what we used to do: -- cgit v1.2.3