diff options
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 59 |
1 files changed, 57 insertions, 2 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index a458f9e6e4..69cf1193b6 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,51 @@ ## Rails 4.0.0 (unreleased) ## +* Implemented ActiveRecord::Relation#none method + + The `none` method returns a chainable relation with zero records + (an instance of the NullRelation class). + + Any subsequent condition chained to the returned relation will continue + generating an empty relation and will not fire any query to the database. + + *Juanjo Bazán* + +* Added the `ActiveRecord::NullRelation` class implementing the null + object pattern for the Relation class. *Juanjo Bazán* + +* Added deprecation for the `:dependent => :restrict` association option. + + Please note: + + * Up until now `has_many` and `has_one`, `:dependent => :restrict` + option raised a `DeleteRestrictionError` at the time of destroying + the object. Instead, it will add an error on the model. + + * To fix this warning, make sure your code isn't relying on a + `DeleteRestrictionError` and then add + `config.active_record.dependent_restrict_raises = false` to your + application config. + + * New rails application would be generated with the + `config.active_record.dependent_restrict_raises = false` in the + application config. + + *Manoj Kumar* + +* Added `create_join_table` migration helper to create HABTM join tables + + create_join_table :products, :categories + # => + # create_table :categories_products, :id => false do |td| + # td.integer :product_id, :null => false + # td.integer :category_id, :null => false + # end + + *Rafael Mendonça França* + +* The primary key is always initialized in the @attributes hash to nil (unless + another value has been specified). + * In previous releases, the following would generate a single query with an `OUTER JOIN comments`, rather than two separate queries: @@ -70,7 +116,16 @@ * PostgreSQL hstore types are automatically deserialized from the database. -## Rails 3.2.0 (unreleased) ## + +## Rails 3.2.1 (unreleased) ## + +* The threshold for auto EXPLAIN is ignored if there's no logger. *fxn* + +* Fix possible race condition when two threads try to define attribute + methods for the same class. + + +## Rails 3.2.0 (January 20, 2012) ## * Added a `with_lock` method to ActiveRecord objects, which starts a transaction, locks the object (pessimistically) and yields to the block. @@ -196,7 +251,7 @@ Client.select(:name).uniq - This also allows you to revert the unqueness in a relation: + This also allows you to revert the uniqueness in a relation: Client.select(:name).uniq.uniq(false) |