Commit 4bdcb547b851b5efe1b50e83ac67e26e5574385b
1 parent
d272b2e2
Exists in
master
and in
1 other branch
Rubocop: use "when then" instead "when;"
Showing
3 changed files
with
6 additions
and
13 deletions
Show diff stats
.rubocop_todo.yml
| ... | ... | @@ -577,13 +577,6 @@ Style/UnneededPercentQ: |
| 577 | 577 | Exclude: |
| 578 | 578 | - 'spec/models/notice_spec.rb' |
| 579 | 579 | |
| 580 | -# Offense count: 6 | |
| 581 | -# Cop supports --auto-correct. | |
| 582 | -Style/WhenThen: | |
| 583 | - Exclude: | |
| 584 | - - 'app/models/problem.rb' | |
| 585 | - - 'lib/hoptoad.rb' | |
| 586 | - | |
| 587 | 580 | # Offense count: 10 |
| 588 | 581 | # Cop supports --auto-correct. |
| 589 | 582 | # Configuration parameters: WordRegex. | ... | ... |
app/models/problem.rb
| ... | ... | @@ -216,11 +216,11 @@ class Problem |
| 216 | 216 | |
| 217 | 217 | def self.ordered_by(sort, order) |
| 218 | 218 | case sort |
| 219 | - when "app"; order_by(["app_name", order]) | |
| 220 | - when "message"; order_by(["message", order]) | |
| 221 | - when "last_notice_at"; order_by(["last_notice_at", order]) | |
| 222 | - when "last_deploy_at"; order_by(["last_deploy_at", order]) | |
| 223 | - when "count"; order_by(["notices_count", order]) | |
| 219 | + when "app" then order_by(["app_name", order]) | |
| 220 | + when "message" then order_by(["message", order]) | |
| 221 | + when "last_notice_at" then order_by(["last_notice_at", order]) | |
| 222 | + when "last_deploy_at" then order_by(["last_deploy_at", order]) | |
| 223 | + when "count" then order_by(["notices_count", order]) | |
| 224 | 224 | else raise("\"#{sort}\" is not a recognized sort") |
| 225 | 225 | end |
| 226 | 226 | end | ... | ... |