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