]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/note_comment.rb
Enable active_record.belongs_to_required_by_default
[rails.git] / app / models / note_comment.rb
index eed917eee3c868d2bf6ec19deb258c4481bc54f7..999d045075f2f033bfc2a4e0ab9e8d83b296000a 100644 (file)
@@ -25,7 +25,7 @@
 
 class NoteComment < ApplicationRecord
   belongs_to :note, :touch => true
-  belongs_to :author, :class_name => "User"
+  belongs_to :author, :class_name => "User", :optional => true
 
   validates :id, :uniqueness => true, :presence => { :on => :update },
                  :numericality => { :on => :update, :only_integer => true }