code cleanup: rubocop: fix Lint/IneffectiveAccessModifier in app/models/issue.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18780 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Toshi MARUYAMA
2019-10-19 13:33:43 +00:00
parent fd7675adf2
commit 75d3e4037b
2 changed files with 18 additions and 16 deletions

View File

@@ -391,7 +391,6 @@ Lint/HandleExceptions:
Lint/IneffectiveAccessModifier: Lint/IneffectiveAccessModifier:
Exclude: Exclude:
- 'app/models/attachment.rb' - 'app/models/attachment.rb'
- 'app/models/issue.rb'
- 'app/models/mail_handler.rb' - 'app/models/mail_handler.rb'
Lint/InterpolationCheck: Lint/InterpolationCheck:

View File

@@ -1724,9 +1724,11 @@ class Issue < ActiveRecord::Base
end end
end end
# Singleton class method is public
class << self
# Update issues so their versions are not pointing to a # Update issues so their versions are not pointing to a
# fixed_version that is not shared with the issue's project # fixed_version that is not shared with the issue's project
def self.update_versions(conditions=nil) def update_versions(conditions=nil)
# Only need to update issues with a fixed_version from # Only need to update issues with a fixed_version from
# a different project and that is not systemwide shared # a different project and that is not systemwide shared
Issue.joins(:project, :fixed_version). Issue.joins(:project, :fixed_version).
@@ -1742,6 +1744,7 @@ class Issue < ActiveRecord::Base
end end
end end
end end
end
def delete_selected_attachments def delete_selected_attachments
if deleted_attachment_ids.present? if deleted_attachment_ids.present?