diff options
-rw-r--r-- | .rubocop_todo.yml | 5 | ||||
-rw-r--r-- | app/models/changeset.rb | 17 |
2 files changed, 9 insertions, 13 deletions
diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 207bef397..19796721a 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -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 diff --git a/app/models/changeset.rb b/app/models/changeset.rb index b9d2c1f53..fe1831f9f 100644 --- a/app/models/changeset.rb +++ b/app/models/changeset.rb @@ -284,14 +284,15 @@ class Changeset < ActiveRecord::Base return @short_comments, @long_comments end - public - - # 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 + # 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 - 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 |