Browse Source

code cleanup: rubocop: fix Layout/AccessModifierIndentation and Layout/EmptyLinesAroundAccessModifier in app/models/tracker.rb

git-svn-id: http://svn.redmine.org/redmine/trunk@18695 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/4.1.0
Toshi MARUYAMA 4 years ago
parent
commit
809d7a7e4b
2 changed files with 2 additions and 3 deletions
  1. 0
    2
      .rubocop_todo.yml
  2. 2
    1
      app/models/tracker.rb

+ 0
- 2
.rubocop_todo.yml View File

@@ -24,7 +24,6 @@ Layout/AccessModifierIndentation:
- 'app/controllers/wiki_controller.rb'
- 'app/models/role.rb'
- 'app/models/setting.rb'
- 'app/models/tracker.rb'

# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle, IndentationWidth.
@@ -143,7 +142,6 @@ Layout/EmptyLinesAroundAccessModifier:
- 'app/controllers/messages_controller.rb'
- 'app/controllers/previews_controller.rb'
- 'app/controllers/timelog_controller.rb'
- 'app/models/tracker.rb'
- 'config/initializers/10-patches.rb'
- 'lib/redmine/syntax_highlighting.rb'


+ 2
- 1
app/models/tracker.rb View File

@@ -140,7 +140,8 @@ class Tracker < ActiveRecord::Base
end
end

private
private

def check_integrity
raise "Cannot delete tracker" if Issue.where(:tracker_id => self.id).any?
end

Loading…
Cancel
Save