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:
parent
eee75cf080
commit
af67ade563
@ -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
|
||||
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user