Fix RuboCop Style/RedundantCondition (#41884).

git-svn-id: https://svn.redmine.org/redmine/trunk@23627 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Go MAEDA
2025-04-11 09:21:17 +00:00
parent 5668aa651f
commit 08ea4e0323
4 changed files with 5 additions and 16 deletions

View File

@@ -26,7 +26,7 @@ class PreviewsController < ApplicationController
if @issue
@previewed = @issue
end
@text = params[:text] ? params[:text] : nil
@text = params[:text] || nil
render :partial => 'common/preview'
end
@@ -34,12 +34,12 @@ class PreviewsController < ApplicationController
if params[:id].present? && news = News.visible.find_by_id(params[:id])
@previewed = news
end
@text = params[:text] ? params[:text] : nil
@text = params[:text] || nil
render :partial => 'common/preview'
end
def text
@text = params[:text] ? params[:text] : nil
@text = params[:text] || nil
render :partial => 'common/preview'
end