Show full comment, description or title

This commit is contained in:
Stanko K.R.
2025-11-12 12:28:22 +01:00
committed by Mike Dalessio
parent 2c3062fd86
commit a41085fe00
+3 -3
View File
@@ -4,15 +4,15 @@ class Search::Result < ApplicationRecord
belongs_to :comment, foreign_key: :comment_id, optional: true
def card_title
highlight(card_title_in_database, show: :full)
highlight(card.title, show: :full) if card_id
end
def card_description
highlight(card_description_in_database, show: :snippet)
highlight(card.description.to_plain_text, show: :snippet) if card_id
end
def comment_body
highlight(comment_body_in_database, show: :snippet)
highlight(comment.body.to_plain_text, show: :snippet) if comment_id
end
def source