diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-02-11 14:56:26 -0700 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-02-11 15:02:36 -0700 |
commit | c51f9b61ce1e167f5f58f07441adcfa117694301 (patch) | |
tree | 70a72c3c0f1d2c80bb47af483a4a56bbbf3ffd88 /activerecord/CHANGELOG.md | |
parent | 5e0b555b453ea2ca36986c111512627d806101e7 (diff) | |
download | rails-c51f9b61ce1e167f5f58f07441adcfa117694301.tar.gz rails-c51f9b61ce1e167f5f58f07441adcfa117694301.tar.bz2 rails-c51f9b61ce1e167f5f58f07441adcfa117694301.zip |
Refactor enum to be defined in terms of the attributes API
In addition to cleaning up the implementation, this allows type casting
behavior to be applied consistently everywhere. (#where for example). A
good example of this was the previous need for handling value to key
conversion in the setter, because the number had to be passed to `where`
directly. This is no longer required, since we can just pass the string
along to where. (It's left around for backwards compat)
Fixes #18387
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index 0265ab0c11..2ee3c90f89 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,8 @@ +* Have `enum` perform type casting consistently with the rest of Active + Record, such as `where`. + + *Sean Griffin* + * `scoping` no longer pollutes the current scope of sibling classes when using STI. e.x. |