diff options
author | Sean Griffin <sean@thoughtbot.com> | 2015-06-19 15:35:35 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2015-06-19 15:35:35 -0600 |
commit | b644964b2b555798fc4b94d384b98438db863b3f (patch) | |
tree | af3a39838508d3cbce032b20b58889a62c607a05 /activerecord/CHANGELOG.md | |
parent | 7d14bd3ff553d6aba11a50b43773bc21ae20f31e (diff) | |
download | rails-b644964b2b555798fc4b94d384b98438db863b3f.tar.gz rails-b644964b2b555798fc4b94d384b98438db863b3f.tar.bz2 rails-b644964b2b555798fc4b94d384b98438db863b3f.zip |
Include `Enumerable` in `ActiveRecord::Relation`
After discussing, we've decided it makes more sense to include it. We're
already forwarding every conflicting method to `to_a`, and there's no
conflation of concerns. `Enumerable` has no mutating methods, and it
just allows us to simplify the code. No existing methods will have a
change in behavior. Un-overridden Enumerable methods will simply
delegate to `each`.
[Sean Griffin & bogdan]
Diffstat (limited to 'activerecord/CHANGELOG.md')
-rw-r--r-- | activerecord/CHANGELOG.md | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/CHANGELOG.md b/activerecord/CHANGELOG.md index aff4982a05..9b5310b6d5 100644 --- a/activerecord/CHANGELOG.md +++ b/activerecord/CHANGELOG.md @@ -1,3 +1,7 @@ +* Include the `Enumerable` module in `ActiveRecord::Relation` + + *Sean Griffin & bogdan* + * Use `Enumerable#sum` in `ActiveRecord::Relation` if a block is given. *Sean Griffin* |