diff options
author | Kasper Timm Hansen <kaspth@gmail.com> | 2017-01-15 19:36:34 +0100 |
---|---|---|
committer | Kasper Timm Hansen <kaspth@gmail.com> | 2017-01-15 19:36:34 +0100 |
commit | a0a1ede8c2eb6436571eae8778033162d1f9dcc3 (patch) | |
tree | 632bc7020c220c56fce87368fe8c83e8df57a699 /railties/exe/rails | |
parent | 1f2a283365cba1efd766adc2d0e38ea44ef31675 (diff) | |
download | rails-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 'railties/exe/rails')
0 files changed, 0 insertions, 0 deletions