aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorAkira Matsuda <ronnie@dio.jp>2012-11-05 13:56:30 +0900
committerAkira Matsuda <ronnie@dio.jp>2012-11-30 01:18:18 +0900
commitde75af7acc5c05c708443de40e78965925165217 (patch)
tree2eb07baa89d145f0d0d66ee51d5fb0e5d62646e6 /activerecord/CHANGELOG.md
parent80b8df5f3d09205d8f239e9aefd5ed0e0ddfd4a5 (diff)
downloadrails-de75af7acc5c05c708443de40e78965925165217.tar.gz
rails-de75af7acc5c05c708443de40e78965925165217.tar.bz2
rails-de75af7acc5c05c708443de40e78965925165217.zip
Relation.where with no args can be chained with not, like, and not_like
examples: Model.where.not field: nil #=> "SELECT * FROM models WHERE field IS NOT NULL Model.where.like name: 'Jeremy%' #=> "SELECT * FROM models WHERE name LIKE 'Jeremy%' this feature was originally suggested by Jeremy Kemper https://github.com/rails/rails/pull/5950#issuecomment-5591330 Closes #5950
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md9
1 files changed, 9 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 66359fb80f..a8c5ffeaed 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,5 +1,14 @@
## Rails 4.0.0 (unreleased) ##
+* Allow `Relation#where` with no arguments to be chained with new query methods
+ `not`, `like`, and `not_like`.
+
+ Example:
+
+ Developer.where.not(name: 'Aaron').where.like(name: 'Takoyaki%')
+
+ *Akira Matsuda*
+
* Fix dirty attribute checks for TimeZoneConversion with nil and blank
datetime attributes. Setting a nil datetime to a blank string should not
result in a change being flagged. Fix #8310