X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/03fdc6d67f1826b1a202eb50c284fa9202af24af..d6b5c0e5c5f94666c80dd0a73dd8ac2b814a7f91:/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