]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/diary_entry.rb
Make directions endpoints own the value and not care which input box they get it...
[rails.git] / app / models / diary_entry.rb
index 58f8710f95d10d8168989e76d449714f57aab2fd..c0fbac546a9f47756c6239ee06fd9ee3cb1bb883 100644 (file)
@@ -16,7 +16,6 @@ class DiaryEntry < ActiveRecord::Base
                             :greater_than_or_equal_to => -180, :less_than_or_equal_to => 180
   validates_associated :language
 
-  after_initialize :set_defaults
   after_save :spam_check
 
   def body
@@ -25,10 +24,6 @@ class DiaryEntry < ActiveRecord::Base
 
 private
 
-  def set_defaults
-    self.body_format = "markdown" unless self.attribute_present?(:body_format)
-  end
-
   def spam_check
     user.spam_check
   end