]> git.openstreetmap.org Git - rails.git/commitdiff
Merge branch 'master' into openstreetbugs
authorTom Hughes <tom@compton.nu>
Mon, 19 Apr 2010 20:30:42 +0000 (21:30 +0100)
committerTom Hughes <tom@compton.nu>
Mon, 19 Apr 2010 20:30:42 +0000 (21:30 +0100)
1  2 
app/controllers/browse_controller.rb

index cb866eb3f9e41089dd0e1b1c2f50af479c3efbc0,a511d67d35fb54cc558ff124a894abf03469540f..d9b18769c37b934d8f77038c5884ee23418c9fe3
@@@ -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
      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