X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/550c4a3a45814fde5c809334c85f1ebc47659a82..0dc04efef698b54da1357f9a41a6dc6c9b260075:/app/models/diary_entry.rb 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