diff options
author | Go MAEDA <maeda@farend.jp> | 2023-03-25 01:32:23 +0000 |
---|---|---|
committer | Go MAEDA <maeda@farend.jp> | 2023-03-25 01:32:23 +0000 |
commit | 32d2b1c42f76c07e13bcf748b2071a29cf350606 (patch) | |
tree | a178f5208bdb7f5e9a43dca6cdbc5ac144b59459 /app/models/wiki_page.rb | |
parent | f27de353381a45427b6e38b87c973902de92484f (diff) | |
download | redmine-32d2b1c42f76c07e13bcf748b2071a29cf350606.tar.gz redmine-32d2b1c42f76c07e13bcf748b2071a29cf350606.zip |
Fix RuboCop offense Style/InverseMethods: Use `present?` instead of inverting `blank?` (#37248).
git-svn-id: https://svn.redmine.org/redmine/trunk@22152 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models/wiki_page.rb')
-rw-r--r-- | app/models/wiki_page.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/wiki_page.rb b/app/models/wiki_page.rb index 594c44bd6..0ee06673e 100644 --- a/app/models/wiki_page.rb +++ b/app/models/wiki_page.rb @@ -273,7 +273,7 @@ class WikiPage < ActiveRecord::Base protected def validate_parent_title - errors.add(:parent_title, :invalid) if !@parent_title.blank? && parent.nil? + errors.add(:parent_title, :invalid) if @parent_title.present? && parent.nil? errors.add(:parent_title, :circular_dependency) if parent && (parent == self || parent.ancestors.include?(self)) if parent_id_changed? && parent && (parent.wiki_id != wiki_id) errors.add(:parent_title, :not_same_project) |