Fix rubocop nits

This commit is contained in:
Andreas Nedbal 2023-10-22 21:00:25 +02:00 committed by Andreas Nedbal
parent e01e973d76
commit b5347decb4
2 changed files with 3 additions and 7 deletions

View File

@ -2,9 +2,6 @@
class ApplicationComponent < ViewComponent::Base
include ApplicationHelper
def current_user = helpers.current_user
def user_signed_in? = helpers.user_signed_in?
delegate :current_user, to: :helpers
delegate :user_signed_in?, to: :helpers
end

View File

@ -17,8 +17,7 @@ class QuestionComponent < ApplicationComponent
def author_identifier = @question.author_is_anonymous ? @question.author_identifier : nil
def follower_question? = !@question.author_is_anonymous && !@question.direct && @question.answer_count > 0
def follower_question? = !@question.author_is_anonymous && !@question.direct && @question.answer_count.positive?
def hide_avatar? = @hide_avatar || @question.author_is_anonymous
end