Omit hash value in question methods

This commit is contained in:
Andreas Nedbal 2022-07-24 22:27:15 +02:00
parent 4f4e6c83a1
commit bdb637047b

View file

@ -7,7 +7,7 @@ module User::QuestionMethods
def ordered_questions(author_is_anonymous: nil, direct: nil)
questions
.where({ author_is_anonymous: author_is_anonymous, direct: direct }.compact)
.where({ author_is_anonymous:, direct: }.compact)
.order(:created_at)
.reverse_order
end