Fix rubocop nits
This commit is contained in:
parent
e01e973d76
commit
b5347decb4
|
@ -2,9 +2,6 @@
|
||||||
|
|
||||||
class ApplicationComponent < ViewComponent::Base
|
class ApplicationComponent < ViewComponent::Base
|
||||||
include ApplicationHelper
|
include ApplicationHelper
|
||||||
|
delegate :current_user, to: :helpers
|
||||||
def current_user = helpers.current_user
|
delegate :user_signed_in?, to: :helpers
|
||||||
|
|
||||||
def user_signed_in? = helpers.user_signed_in?
|
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
|
@ -17,8 +17,7 @@ class QuestionComponent < ApplicationComponent
|
||||||
|
|
||||||
def author_identifier = @question.author_is_anonymous ? @question.author_identifier : nil
|
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
|
def hide_avatar? = @hide_avatar || @question.author_is_anonymous
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue