Please sign in to comment.
Merge branch 'deprecate-calculations-with-block'
Follow up of the discussion from the original merge commit: f9cb645#commitcomment-1414561 We want to avoid people's mistakes with methods like count and sum when called with a block, that can easily lead to code performing poorly and that could be way better written with a db query. Please check the discussion there for more background. Closes #8268
- Loading branch information...
Showing with 25 additions and 49 deletions.
- +5 −7 activerecord/CHANGELOG.md
- +1 −1 activerecord/lib/active_record/associations.rb
- +0 −9 activerecord/lib/active_record/associations/collection_association.rb
- +9 −14 activerecord/lib/active_record/relation/calculations.rb
- +6 −0 activerecord/test/cases/associations/has_many_associations_test.rb
- +4 −18 activerecord/test/cases/calculations_test.rb