Set Open Graph image to first image for diary entries

This commit is contained in:
Anton Khorev 2024-06-06 17:28:57 +03:00
parent c7353c9ac1
commit a73e20cd5c
5 changed files with 16 additions and 4 deletions

View file

@ -50,7 +50,7 @@ class DiaryEntry < ApplicationRecord
after_save :spam_check
def body
RichText.new(self[:body_format], self[:body])
@body ||= RichText.new(self[:body_format], self[:body])
end
private