aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 4323c57b9e..ce1f1102d5 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,17 @@
+* Add negative scopes for all enum values.
+
+ Example:
+
+ class Post < ActiveRecord::Base
+ enum status: %i[ drafted active trashed ]
+ end
+
+ Post.not_drafted # => where.not(status: :drafted)
+ Post.not_active # => where.not(status: :active)
+ Post.not_trashed # => where.not(status: :trashed)
+
+ *DHH*
+
* Fix different `count` calculation when using `size` with manual `select` with DISTINCT.
Fixes #35214.