From: Tom Hughes Date: Mon, 7 Jun 2010 21:26:33 +0000 (+0100) Subject: Merge branch 'master' into openstreetbugs X-Git-Tag: live~5096^2~207 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/50224b473bce736436d27c64bd46c1910e4d43ec?hp=--cc Merge branch 'master' into openstreetbugs Conflicts: app/controllers/browse_controller.rb --- 50224b473bce736436d27c64bd46c1910e4d43ec diff --cc app/controllers/browse_controller.rb index d9b18769c,9aec1060a..2962c6836 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@@ -77,29 -77,4 +77,13 @@@ class BrowseController < ApplicationCon rescue ActiveRecord::RecordNotFound 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 - SystemTimer.timeout_after(30) do - yield - end - rescue ActionView::TemplateError => ex - if ex.original_exception.is_a?(Timeout::Error) - render :action => "timeout" - else - raise - end - rescue Timeout::Error - render :action => "timeout" - end end