1
0
mirror of https://github.com/meineerde/redmine.git synced 2025-12-26 10:21:14 +00:00

code cleanup: rubocop: fix Lint/UselessAccessModifier in app/models/changeset.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18607 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA 2019-10-07 07:20:26 +00:00
parent eee75cf080
commit af67ade563
2 changed files with 9 additions and 13 deletions

View File

@ -591,11 +591,6 @@ Lint/UriEscapeUnescape:
- 'lib/redmine/scm/adapters/subversion_adapter.rb'
- 'test/functional/wiki_controller_test.rb'
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
Lint/UselessAccessModifier:
Exclude:
- 'app/models/changeset.rb'
Lint/UselessAssignment:
Enabled: false

View File

@ -284,14 +284,15 @@ class Changeset < ActiveRecord::Base
return @short_comments, @long_comments
end
public
# singleton class are public
class << self
# Strips and reencodes a commit log before insertion into the database
def normalize_comments(str, encoding)
Changeset.to_utf8(str.to_s.strip, encoding)
end
# Strips and reencodes a commit log before insertion into the database
def self.normalize_comments(str, encoding)
Changeset.to_utf8(str.to_s.strip, encoding)
end
def self.to_utf8(str, encoding)
Redmine::CodesetUtil.to_utf8(str, encoding)
def to_utf8(str, encoding)
Redmine::CodesetUtil.to_utf8(str, encoding)
end
end
end