X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/8865543903caa9cf364f6443c42a4b5600505375..abf3358ce505c7e67a92d895a6b5cd4a641855d9:/app/controllers/browse_controller.rb diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index a77b0f94a..cb866eb3f 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -78,6 +78,15 @@ class BrowseController < ApplicationController 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