aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/CHANGELOG.md
diff options
context:
space:
mode:
authorAlberto Almagro <albertoalmagro@gmail.com>2018-10-06 18:08:45 +0200
committerAlberto Almagro <albertoalmagro@gmail.com>2018-10-10 10:22:07 +0200
commit9b9640112e197e94e13940c0c0f990cc80ca5498 (patch)
treed8b0bc06af5ce347742d8c7beb2cef8f820c572f /activerecord/CHANGELOG.md
parenta52c6989a0aacc50b35891265a0b5631e1ec2370 (diff)
downloadrails-9b9640112e197e94e13940c0c0f990cc80ca5498.tar.gz
rails-9b9640112e197e94e13940c0c0f990cc80ca5498.tar.bz2
rails-9b9640112e197e94e13940c0c0f990cc80ca5498.zip
Raise on invalid definition values
When defining a Hash enum it can be easy to use [] instead of {}. This commit checks that only valid definition values are provided, those can be a Hash, an array of Symbols or an array of Strings. Otherwise it raises an ArgumentError. Fixes #33961
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r--activerecord/CHANGELOG.md11
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md
index 19558a9e0c..6397bc361a 100644
--- a/activerecord/CHANGELOG.md
+++ b/activerecord/CHANGELOG.md
@@ -1,3 +1,14 @@
+* Enum raises on invalid definition values
+
+ When defining a Hash enum it can be easy to use [] instead of {}. This
+ commit checks that only valid definition values are provided, those can
+ be a Hash, an array of Symbols or an array of Strings. Otherwise it
+ raises an ArgumentError.
+
+ Fixes #33961
+
+ *Alberto Almagro*
+
* Reloading associations now clears the Query Cache like `Persistence#reload` does.
```