X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/67a03d44a171a05fc637e1b9ecfc8d3b7769dc85..c798fe416a60eb25f8390ca8a5ab22126dfc7155:/app/models/diary_entry.rb diff --git a/app/models/diary_entry.rb b/app/models/diary_entry.rb index 99a56b2ce..de2a42ae3 100644 --- a/app/models/diary_entry.rb +++ b/app/models/diary_entry.rb @@ -27,6 +27,7 @@ class DiaryEntry < ActiveRecord::Base attr_accessible :title, :body, :language_code, :latitude, :longitude after_initialize :set_defaults + after_save :spam_check def body RichText.new(read_attribute(:body_format), read_attribute(:body)) @@ -37,4 +38,8 @@ private def set_defaults self.body_format = "markdown" unless self.attribute_present?(:body_format) end + + def spam_check + user.spam_check + end end