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
This commit is contained in:
Toshi MARUYAMA
2019-11-24 16:46:37 +00:00
parent c9fee7e00a
commit 1bc6d701c9
2 changed files with 1 additions and 6 deletions

View File

@@ -306,11 +306,6 @@ Layout/SpaceInsideParens:
- 'test/unit/issue_subtasking_test.rb' - 'test/unit/issue_subtasking_test.rb'
- 'test/unit/lib/redmine/export/pdf_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. # Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle. # Configuration parameters: EnforcedStyle.
# SupportedStyles: space, no_space # SupportedStyles: space, no_space

View File

@@ -77,7 +77,7 @@ class Project < ActiveRecord::Base
# downcase letters, digits, dashes but not digits only # 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? } validates_format_of :identifier, :with => /\A(?!\d+$)[a-z0-9\-_]*\z/, :if => Proc.new { |p| p.identifier_changed? }
# reserved words # reserved words
validates_exclusion_of :identifier, :in => %w( new ) validates_exclusion_of :identifier, :in => %w(new)
validate :validate_parent validate :validate_parent
after_save :update_inherited_members, :if => Proc.new {|project| project.saved_change_to_inherit_members?} after_save :update_inherited_members, :if => Proc.new {|project| project.saved_change_to_inherit_members?}