diff options
author | Juanjo Bazán <jjbazan@gmail.com> | 2012-01-30 21:36:47 +0100 |
---|---|---|
committer | Juanjo Bazán <jjbazan@gmail.com> | 2012-01-31 19:50:09 +0100 |
commit | 8270e4a8ce8337fca98030953922e5992b06a3dd (patch) | |
tree | b7a1c68c6fe36a18c88e92363f648b609091ee5f /activerecord/CHANGELOG.md | |
parent | bb842e8d2111e50b21a14b8bd6d89371a4b9cd68 (diff) | |
download | rails-8270e4a8ce8337fca98030953922e5992b06a3dd.tar.gz rails-8270e4a8ce8337fca98030953922e5992b06a3dd.tar.bz2 rails-8270e4a8ce8337fca98030953922e5992b06a3dd.zip |
Added `none` query method to return zero records.
And added NullRelation class implementing the null object pattern for the `Relation` class.
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index e9e97f5d62..69cf1193b6 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,5 +1,18 @@ ## 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: |