From: Tom Hughes Date: Mon, 19 Apr 2010 20:30:42 +0000 (+0100) Subject: Merge branch 'master' into openstreetbugs X-Git-Tag: live~5064^2~216 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/acbc99ac16103e1be5c1ef1841794f259e3b6a03?hp=-c Merge branch 'master' into openstreetbugs --- acbc99ac16103e1be5c1ef1841794f259e3b6a03 diff --combined app/controllers/browse_controller.rb index cb866eb3f,a511d67d3..d9b18769c --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@@ -78,15 -78,6 +78,15 @@@ class BrowseController < ApplicationCon render :action => "not_found", :status => :not_found end + def bug + @type = "bug" + @bug = MapBug.find(params[:id]) + @next = MapBug.find(:first, :order => "id ASC", :conditions => [ "status != 'hidden' AND id > :id", { :id => @bug.id }] ) + @prev = MapBug.find(:first, :order => "id DESC", :conditions => [ "status != 'hidden' AND id < :id", { :id => @bug.id }] ) + rescue ActiveRecord::RecordNotFound + render :action => "not_found", :status => :not_found + end + private def timeout @@@ -95,11 -86,11 +95,11 @@@ end rescue ActionView::TemplateError => ex if ex.original_exception.is_a?(Timeout::Error) - render :action => "timeout", :status => :request_timeout + render :action => "timeout" else raise end rescue Timeout::Error - render :action => "timeout", :status => :request_timeout + render :action => "timeout" end end