diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-17 18:10:25 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-09-17 18:10:25 +0000 |
commit | caa8a005202b267b75baf521d5f613f3a2bce600 (patch) | |
tree | df72b8673b625b22037895a81b672a8b1650d5a6 /actionpack/CHANGELOG | |
parent | 98a412aa3853b9e31b747f53e58a841966df5f1b (diff) | |
download | rails-caa8a005202b267b75baf521d5f613f3a2bce600.tar.gz rails-caa8a005202b267b75baf521d5f613f3a2bce600.tar.bz2 rails-caa8a005202b267b75baf521d5f613f3a2bce600.zip |
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
Diffstat (limited to 'actionpack/CHANGELOG')
-rw-r--r-- | actionpack/CHANGELOG | 8 |
1 files changed, 8 insertions, 0 deletions
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: |