]> git.openstreetmap.org Git - rails.git/blobdiff - app/controllers/diary_entry_controller.rb
Covering the case of an entry not being found. More diary entry tests.
[rails.git] / app / controllers / diary_entry_controller.rb
index 60f5211fd27850d32687ba40ed2379c0a8788124..bd08bcd9795797d6e411d9a1c2ebd9016fc24236 100644 (file)
@@ -38,6 +38,8 @@ class DiaryEntryController < ApplicationController
         redirect_to :controller => 'diary_entry', :action => 'view', :id => params[:id]
       end
     end
+  rescue ActiveRecord::RecordNotFound
+    render :action => "no_such_entry", :status => :not_found
   end
 
   def comment