aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2005-06-16 05:35:10 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2005-06-16 05:35:10 +0000
commitbfe6a759c25ad02b4bfcb2dd16999d8ba72e2df8 (patch)
tree0d3274d426dc294ec0deb6109d547162391738c1 /activerecord/CHANGELOG
parent7b47f150fd73dc84652498a960fc17b601e77a0a (diff)
downloadrails-bfe6a759c25ad02b4bfcb2dd16999d8ba72e2df8.tar.gz
rails-bfe6a759c25ad02b4bfcb2dd16999d8ba72e2df8.tar.bz2
rails-bfe6a759c25ad02b4bfcb2dd16999d8ba72e2df8.zip
Added actual database-changing behavior to collection assigment for has_many and has_and_belongs_to_many #1425 [Sebastian Kanthak]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1428 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/CHANGELOG')
-rw-r--r--activerecord/CHANGELOG13
1 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG b/activerecord/CHANGELOG
index b91fb6213a..107d1cb698 100644
--- a/activerecord/CHANGELOG
+++ b/activerecord/CHANGELOG
@@ -1,5 +1,18 @@
*SVN*
+* Added actual database-changing behavior to collection assigment for has_many and has_and_belongs_to_many #1425 [Sebastian Kanthak].
+ Example:
+
+ david.projects = [Project.find(1), Project.new("name" => "ActionWebSearch")]
+ david.save
+
+ If david.projects already contain the project with ID 1, this is left unchanged. Any other projects are dropped. And the new
+ project is saved when david.save is called.
+
+ Also included is a way to do assignments through IDs, which is perfect for checkbox updating, so you get to do:
+
+ david.project_ids = [1, 5, 7]
+
* Corrected typo in find SQL for has_and_belongs_to_many. #1312 [ben@bensinclair.com]
* Added ActiveRecord::Recursion for guarding against recursive saves