]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/diary_entry.rb
Localisation updates from https://translatewiki.net.
[rails.git] / app / models / diary_entry.rb
index e83dfb9ee47af81706161260781f7bb663a8fc88..089c7e6c60fecb1ebcc92238a00eb0d1e37a7c9e 100644 (file)
@@ -50,7 +50,7 @@ class DiaryEntry < ApplicationRecord
   after_save :spam_check
 
   def body
   after_save :spam_check
 
   def body
-    RichText.new(self[:body_format], self[:body])
+    @body ||= RichText.new(self[:body_format], self[:body])
   end
 
   private
   end
 
   private