From: Toshi MARUYAMA Date: Sun, 24 Nov 2019 16:46:37 +0000 (+0000) Subject: cleanup: rubocop: fix Layout/SpaceInsidePercentLiteralDelimiters in app/models/project.rb X-Git-Tag: 4.2.0~1360 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=1bc6d701c9b1394146f5c2d49de118526613c562;p=redmine.git cleanup: rubocop: fix Layout/SpaceInsidePercentLiteralDelimiters in app/models/project.rb git-svn-id: http://svn.redmine.org/redmine/trunk@19280 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 332554305..7fa7ed1f7 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -306,11 +306,6 @@ Layout/SpaceInsideParens: - 'test/unit/issue_subtasking_test.rb' - 'test/unit/lib/redmine/export/pdf_test.rb' -# Cop supports --auto-correct. -Layout/SpaceInsidePercentLiteralDelimiters: - Exclude: - - 'app/models/project.rb' - # Cop supports --auto-correct. # Configuration parameters: EnforcedStyle. # SupportedStyles: space, no_space diff --git a/app/models/project.rb b/app/models/project.rb index d4af06ca1..baeeb8e3e 100644 --- a/app/models/project.rb +++ b/app/models/project.rb @@ -77,7 +77,7 @@ class Project < ActiveRecord::Base # downcase letters, digits, dashes but not digits only validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :if => Proc.new { |p| p.identifier_changed? } # reserved words - validates_exclusion_of :identifier, :in => %w( new ) + validates_exclusion_of :identifier, :in => %w(new) validate :validate_parent after_save :update_inherited_members, :if => Proc.new {|project| project.saved_change_to_inherit_members?}