diff options
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 98 |
1 files changed, 95 insertions, 3 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 3fbf043c7c..97616ffc58 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,8 +1,88 @@ -## Rails 4.0.0.beta1 (February 25, 2013) ## +## Rails 4.0.0 (unreleased) ## -* Fix overriding of attributes by default_scope on `ActiveRecord::Base#dup`. +* Assigning "0.0" to a nullable numeric column does not make it dirty. + Fix #9034. - *Hiroshige UMINO* + Example: + + product = Product.create price: 0.0 + product.price = '0.0' + product.changed? # => false (this used to return true) + product.changes # => {} (this used to return { price: [0.0, 0.0] }) + + *Yves Senn* + +* Added functionality to unscope relations in a relations chain. For + instance, if you are passed in a chain of relations as follows: + + User.where(name: "John").order('id DESC') + + but you want to get rid of order, then this feature allows you to do: + + User.where(name: "John").order('id DESC').unscope(:order) + == User.where(name: "John") + + The .unscope() function is more general than the .except() method because + .except() only works on the relation it is acting on. However, .unscope() + works for any relation in the entire relation chain. + + *John Wang* + +* Postgresql timestamp with time zone (timestamptz) datatype now returns a + ActiveSupport::TimeWithZone instance instead of a string + + *Troy Kruthoff* + +* 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, + + 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. + + *Sammy Larbi* + +* Fix bug that raises the wrong exception when the exception handled by PostgreSQL adapter + doesn't respond to `#result`. + Fixes #8617. + + *kennyj* + +* Support PostgreSQL specific column types when using `change_table`. + Fixes #9480. + + Example: + + change_table :authors do |t| + t.hstore :books + t.json :metadata + end + + *Yves Senn* + +* Revert 408227d9c5ed7d, 'quote numeric'. This introduced some regressions. + + *Steve Klabnik* + +* Fix calculation of `db_runtime` property in + `ActiveRecord::Railties::ControllerRuntime#cleanup_view_runtime`. + Previously, after raising `ActionView::MissingTemplate`, `db_runtime` was + not populated. + Fixes #9215. + + *Igor Fedoronchuk* + +* Do not try to touch invalid (and thus not persisted) parent record + for a `belongs_to :parent, touch: true` association + + *Olek Janiszewski* * Fix when performing an ordered join query. The bug only affected queries where the order was given with a symbol. @@ -13,6 +93,17 @@ # This will expand the order :name to "authors".name. Author.joins(:books).where('books.published = 1').order(:name) + +## Rails 4.0.0.beta1 (February 25, 2013) ## + +* Fix overriding of attributes by `default_scope` on `ActiveRecord::Base#dup`. + + *Hiroshige UMINO* + +* Update queries now use prepared statements. + + *Olli Rissanen* + * Fixing issue #8345. Now throwing an error when one attempts to touch a new object that has not yet been persisted. For instance: @@ -1507,4 +1598,5 @@ *Aaron Patterson* + Please check [3-2-stable](https://github.com/rails/rails/blob/3-2-stable/activerecord/CHANGELOG.md) for previous changes. |