diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-06 22:27:08 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2006-12-06 22:27:08 +0000 |
commit | 42596543dc0bac7aad9763b82ee4cc2b17f3110c (patch) | |
tree | 873c69b136730b34564b45bbd7c220e165272ddf /actionpack/CHANGELOG | |
parent | 4c9000d51d0c39cfff438767f4709b8d8ad1c692 (diff) | |
download | rails-42596543dc0bac7aad9763b82ee4cc2b17f3110c.tar.gz rails-42596543dc0bac7aad9763b82ee4cc2b17f3110c.tar.bz2 rails-42596543dc0bac7aad9763b82ee4cc2b17f3110c.zip |
respond_to recognizes JSON. render :json => @person.to_json automatically sets the content type and takes a :callback option to specify a client-side function to call using the rendered JSON as an argument. References #4185.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5694 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/CHANGELOG')
-rw-r--r-- | actionpack/CHANGELOG | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/actionpack/CHANGELOG b/actionpack/CHANGELOG index 87fe235477..52253a8777 100644 --- a/actionpack/CHANGELOG +++ b/actionpack/CHANGELOG @@ -1,5 +1,11 @@ *SVN* +* respond_to recognizes JSON. render :json => @person.to_json automatically sets the content type and takes a :callback option to specify a client-side function to call using the rendered JSON as an argument. #4185 [Scott Raymond, eventualbuddha] + # text/x-json response with body 'Element.show({:name: "David"})' + respond_to do |format| + format.json { render :json => { :name => "David" }.to_json, :callback => 'Element.show' } + end + * Makes :discard_year work without breaking multi-attribute parsing in AR. #1260, #3800 [sean@ardismg.com, jmartin@desertflood.com, stephen@touset.org, Bob Silva] * Adds html id attribute to date helper elements. #1050, #1382 [mortonda@dgrmm.net, David North, Bob Silva] |