X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/bb490aca81d8063a9ad8dd8f1a023c709c096792..e3b8b8933044104bb515d34c3d36851caba78ac7:/app/controllers/browse_controller.rb diff --git a/app/controllers/browse_controller.rb b/app/controllers/browse_controller.rb index f6bd89d4d..2036e4f10 100644 --- a/app/controllers/browse_controller.rb +++ b/app/controllers/browse_controller.rb @@ -80,11 +80,11 @@ 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 }] ) + def note + @type = "note" + @note = Note.find(params[:id]) + @next = Note.find(:first, :order => "id ASC", :conditions => [ "status != 'hidden' AND id > :id", { :id => @note.id }] ) + @prev = Note.find(:first, :order => "id DESC", :conditions => [ "status != 'hidden' AND id < :id", { :id => @note.id }] ) rescue ActiveRecord::RecordNotFound render :action => "not_found", :status => :not_found end