mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: update rubocop to version 0.77
We like to stay as close as possible to latest with rubocop cause the cops get better. This update required some code changes, specifically the default is to avoid explicit returns where implicit is done Also this renames a few rules
This commit is contained in:
@@ -10,7 +10,7 @@ class ResolveDuplicateGroupNames < ActiveRecord::Migration[4.2]
|
||||
GROUP BY lower(name)
|
||||
HAVING count(*) > 1);'
|
||||
|
||||
groups = Group.where id: results
|
||||
groups = Group.where id: results
|
||||
groups.group_by { |g| g.name.downcase }.each do |key, value|
|
||||
value.each_with_index do |dup, index|
|
||||
dup.update! name: "#{dup.name[0..18]}_#{index + 1}" if index > 0
|
||||
|
||||
Reference in New Issue
Block a user