Add rubocop to our build. (#5004)

This commit is contained in:
Guo Xiang Tan
2017-07-28 10:20:09 +09:00
committed by GitHub
parent ff4e295c4f
commit 5012d46cbd
871 changed files with 5480 additions and 6056 deletions

View File

@@ -11,7 +11,7 @@ class ResolveDuplicateGroupNames < ActiveRecord::Migration
groups = Group.where id: results.map { |r| r['id'] }
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
dup.update! name: "#{dup.name[0..18]}_#{index + 1}" if index > 0
end
end
end