diff options
author | Yves Senn <yves.senn@gmail.com> | 2013-03-01 15:30:22 +0100 |
---|---|---|
committer | Yves Senn <yves.senn@gmail.com> | 2013-03-01 21:29:46 +0100 |
commit | b9399c470bc7cf85952ab0cc7113f4f825a1a7b3 (patch) | |
tree | 8c647d37ee5ac822bf41731e3361888f668570be /activerecord/CHANGELOG.md | |
parent | ce7133bf520ea3f2b731448e8c697ed330340bb2 (diff) | |
download | rails-b9399c470bc7cf85952ab0cc7113f4f825a1a7b3.tar.gz rails-b9399c470bc7cf85952ab0cc7113f4f825a1a7b3.tar.bz2 rails-b9399c470bc7cf85952ab0cc7113f4f825a1a7b3.zip |
deal with `#append` and `#prepend` on association collections.
Closes #7364.
Collection associations behave similar to Arrays. However there is no
way to prepend records. And to append one should use `<<`. Before this
patch `#append` and `#prepend` did not add the record to the loaded
association.
`#append` now behaves like `<<` and `#prepend` is not defined.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 235a91fafa..c5bef0a6e6 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,12 +1,18 @@ ## Rails 4.0.0 (unreleased) ## +* The `#append` method for collection associations behaves like`<<`. + `#prepend` is not defined and `<<` or `#append` should be used. + Fixes #7364. + + *Yves Senn* + * Added support for creating a table via Rails migration generator. - For example, + For example, rails g migration create_books title:string content:text - will generate a migration that creates a table called books with - the listed attributes, without creating a model. + will generate a migration that creates a table called books with + the listed attributes, without creating a model. *Sammy Larbi* @@ -372,7 +378,7 @@ deprecated and removed in future versions of Rails. *Amparo Luna + Guillermo Iguaran* - + * `after_commit` and `after_rollback` now validate the `:on` option and raise an `ArgumentError` if it is not one of `:create`, `:destroy` or `:update` |