From 6aec21b5b86a9bfa1a9d60a1491bda6c597467b0 Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Sat, 7 May 2011 17:21:38 +0100 Subject: [PATCH] Merge the gpx_bugs action into the main get_bugs action --- app/controllers/map_bugs_controller.rb | 8 +------- config/routes.rb | 2 +- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/controllers/map_bugs_controller.rb b/app/controllers/map_bugs_controller.rb index 2de11ba75..158bf435a 100644 --- a/app/controllers/map_bugs_controller.rb +++ b/app/controllers/map_bugs_controller.rb @@ -127,7 +127,6 @@ class MapBugsController < ApplicationController render_ok end - def rss # Figure out the bbox bbox = params['bbox'] @@ -145,18 +144,13 @@ class MapBugsController < ApplicationController limit = getLimit conditions = closedCondition conditions = cond_merge conditions, [OSM.sql_for_area_no_quadtile(@min_lat, @min_lon, @max_lat, @max_lon)] - + check_boundaries(@min_lon, @min_lat, @max_lon, @max_lat, :false) @comments = MapBugComment.find(:all, :limit => limit, :order => "date_created DESC", :joins => :map_bug, :include => :map_bug, :conditions => conditions) render :template => 'map_bugs/rss.rss' end - def gpx_bugs - request.format = :xml - get_bugs - end - def read @bug = MapBug.find(params['id']) raise OSM::APINotFoundError unless @bug diff --git a/config/routes.rb b/config/routes.rb index 62c43ee03..ddd2777d5 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -80,7 +80,7 @@ ActionController::Routing::Routes.draw do |map| map.connect "api/#{API_VERSION}/bugs/addPOIexec", :controller => 'map_bugs', :action => 'add_bug' map.connect "api/#{API_VERSION}/bugs/closePOIexec", :controller => 'map_bugs', :action => 'close_bug' map.connect "api/#{API_VERSION}/bugs/editPOIexec", :controller => 'map_bugs', :action => 'edit_bug' - map.connect "api/#{API_VERSION}/bugs/getGPX", :controller => 'map_bugs', :action => 'gpx_bugs' + map.connect "api/#{API_VERSION}/bugs/getGPX", :controller => 'map_bugs', :action => 'get_bugs', :format => :gpx map.connect "api/#{API_VERSION}/bugs/getRSSfeed", :controller => 'map_bugs', :action => 'rss' map.connect "api/#{API_VERSION}/bugs", :controller => 'map_bugs', :action => 'get_bugs' map.connect "api/#{API_VERSION}/bugs/search", :controller => 'map_bugs', :action => 'search' -- 2.43.2