X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/12c1d5e6c05813a0697724277b4d8529a1a7c240..b5c72bb6d7416848cce62efde99341b6b99c5005:/app/models/diary_entry.rb?ds=sidebyside diff --git a/app/models/diary_entry.rb b/app/models/diary_entry.rb index e83dfb9ee..089c7e6c6 100644 --- a/app/models/diary_entry.rb +++ b/app/models/diary_entry.rb @@ -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