Add a test for commenting on diary entries
[rails.git] / app / controllers / diary_entry_controller.rb
index f218ea6bb1ea89d4f1c634a6da4e8995d5267655..12f3fdcc83435187e52dd6abfd9d1ffa2ad68b11 100644 (file)
@@ -70,6 +70,8 @@ class DiaryEntryController < ApplicationController
     else
       render :action => 'view'
     end
+  rescue ActiveRecord::RecordNotFound
+    render :action => "no_such_entry", :status => :not_found
   end
 
   def list