X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7a5ac0394dfcd5d1cd5a8b659563ddd7afc33332..160429e62d88810ec49ccc9c504edee675dca080:/app/controllers/browse_controller.rb?ds=sidebyside diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index a511d67d3..d9b18769c 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