aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2008-04-01 20:09:45 +0000
committerRick Olson <technoweenie@gmail.com>2008-04-01 20:09:45 +0000
commitd450ac4459165e3af6e45798a6afeac1876f3bc4 (patch)
treef555ffd09f7d79fde29824b658cc6e278fcf46ca /activerecord/CHANGELOG
parent6a74360f972c75c70b64e3b6f51bb7a64681e2e3 (diff)
downloadrails-d450ac4459165e3af6e45798a6afeac1876f3bc4.tar.gz
rails-d450ac4459165e3af6e45798a6afeac1876f3bc4.tar.bz2
rails-d450ac4459165e3af6e45798a6afeac1876f3bc4.zip
Tweak ActiveRecord::Base#to_json to include a root value in the returned hash: {post: {title: ...}} [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9202 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r--activerecord/CHANGELOG6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index 069d6a3841..2d13ca8deb 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,11 @@
*SVN*
+* Tweak ActiveRecord::Base#to_json to include a root value in the returned hash: {"post": {"title": ...}} [rick]
+
+ Post.find(1).to_json # => {"title": ...}
+ config.active_record.include_root_in_json = true
+ Post.find(1).to_json # => {"post": {"title": ...}}
+
* Add efficient #include? to AssociationCollection (for has_many/has_many :through/habtm). [stopdropandrew]
* PostgreSQL: create_ and drop_database support. #9042 [ez, pedz, nicksieger]