Set Open Graph image to first image for diary entries
This commit is contained in:
parent
c7353c9ac1
commit
a73e20cd5c
5 changed files with 16 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue