aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/errors.rb
diff options
context:
space:
mode:
authorKasper Timm Hansen <kaspth@gmail.com>2017-01-15 19:36:34 +0100
committerKasper Timm Hansen <kaspth@gmail.com>2017-01-15 19:36:34 +0100
commita0a1ede8c2eb6436571eae8778033162d1f9dcc3 (patch)
tree632bc7020c220c56fce87368fe8c83e8df57a699 /activerecord/lib/active_record/errors.rb
parent1f2a283365cba1efd766adc2d0e38ea44ef31675 (diff)
downloadrails-a0a1ede8c2eb6436571eae8778033162d1f9dcc3.tar.gz
rails-a0a1ede8c2eb6436571eae8778033162d1f9dcc3.tar.bz2
rails-a0a1ede8c2eb6436571eae8778033162d1f9dcc3.zip
Don't guard against `touch: []`.
Closes #27683. Seeing a code sample that leads to what we're guarding against: ```ruby Topic.update_counters(1, replies_count: 1, touch: []) ``` It doesn't look like a case people would ever intentionally end up with. Thus we're better off sparing the conditional. Note: it could happen if a method returns an empty array that's then passed to `update_counters` and its touchy friends. But `[].presence` can fix that once people see their query blow up. [ Eugene Kenny & Kasper Timm Hansen ]
Diffstat (limited to 'activerecord/lib/active_record/errors.rb')
0 files changed, 0 insertions, 0 deletions