mirror of
https://github.com/redmine/redmine.git
synced 2026-05-06 06:36:24 +02:00
RuboCop: fix Style/RedundantSort in app/models/import.rb (#34718).
git-svn-id: http://svn.redmine.org/redmine/trunk@21353 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
@@ -70,7 +70,7 @@ class Import < ActiveRecord::Base
|
||||
begin
|
||||
content = File.read(filepath, 256)
|
||||
|
||||
separator = [',', ';'].sort_by {|sep| content.count(sep)}.last
|
||||
separator = [',', ';'].max_by {|sep| content.count(sep)}
|
||||
|
||||
guessed_encoding = Redmine::CodesetUtil.guess_encoding(file_content)
|
||||
encoding =
|
||||
|
||||
Reference in New Issue
Block a user