diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-11 01:23:29 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2006-03-11 01:23:29 +0000 |
commit | 1c16649b4895012eac76f3a7f22f3382b0034a97 (patch) | |
tree | 6674f67a9ea89529b02164a08e076e51b82a1bf1 /actionpack/CHANGELOG | |
parent | 8152695b809aa47177ab5d5db43d93d8f55ee52a (diff) | |
download | rails-1c16649b4895012eac76f3a7f22f3382b0034a97.tar.gz rails-1c16649b4895012eac76f3a7f22f3382b0034a97.tar.bz2 rails-1c16649b4895012eac76f3a7f22f3382b0034a97.zip |
Added better support for using the same actions to output for different sources depending on the Accept header [DHH] Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3838 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/CHANGELOG')
-rw-r--r-- | actionpack/CHANGELOG | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 222ed04d50..575bb0f534 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,24 @@ *SVN* +* Added better support for using the same actions to output for different sources depending on the Accept header [DHH]. Example: + + class WeblogController < ActionController::Base + def create + @post = Post.create(params[:post]) + + respond_to do |type| + type.js { render } # renders create.rjs + type.html { redirect_to :action => "index" } + type.xml do + headers["Location"] = url_for(:action => "show", :id => @post) + render(:nothing, :status => "201 Created") + end + end + end + end + +* Added Base#render(:xml => xml) that works just like Base#render(:text => text), but sets the content-type to text/xml and the charset to UTF-8 [DHH] + * Integration test's url_for now runs in the context of the last request (if any) so after post /products/show/1 url_for :action => 'new' will yield /product/new [Tobias Luetke] * Re-added mixed-in helper methods for the JavascriptGenerator. Moved JavascriptGenerators methods to a module that is mixed in after the helpers are added. Also fixed that variables set in the enumeration methods like #collect are set correctly. Documentation added for the enumeration methods [Rick Olson]. Examples: |