Throw an exception if adding a note comment fails
[rails.git] / app / controllers / notes_controller.rb
index fde27e8b29e05dd1a512a5e15989bb1c0dcb0127..13e930ca53abc997f3178a679c691ecbb6dc0d88 100644 (file)
@@ -345,7 +345,7 @@ class NotesController < ApplicationController
       attributes[:author_ip] = request.remote_ip
     end
 
-    comment = note.comments.create(attributes)
+    comment = note.comments.create!(attributes)
 
     note.comments.map(&:author).uniq.each do |user|
       if notify && user && user != @user && user.visible?