From: Shaun McDonald Date: Wed, 26 Nov 2008 11:36:10 +0000 (+0000) Subject: Renaming the include action to expand_bbox in the changeset controller. X-Git-Tag: live~7622^2~127 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/a4e5e8437f8c1836c6389f7aa49cc3884f3a7cf7 Renaming the include action to expand_bbox in the changeset controller. --- diff --git a/app/controllers/changeset_controller.rb b/app/controllers/changeset_controller.rb index d7764d995..fad797cdc 100644 --- a/app/controllers/changeset_controller.rb +++ b/app/controllers/changeset_controller.rb @@ -70,7 +70,7 @@ class ChangesetController < ApplicationController # increase the size of the bounding box. this is a hint that clients can # set either before uploading a large number of changes, or changes that # the client (but not the server) knows will affect areas further away. - def include + def expand_bbox # only allow POST requests, because although this method is # idempotent, there is no "document" to PUT really... if request.post? diff --git a/config/routes.rb b/config/routes.rb index 88fa0a551..b99dfd2ca 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,7 +6,7 @@ ActionController::Routing::Routes.draw do |map| map.connect "api/#{API_VERSION}/changeset/create", :controller => 'changeset', :action => 'create' map.connect "api/#{API_VERSION}/changeset/:id/upload", :controller => 'changeset', :action => 'upload', :id => /\d+/ map.connect "api/#{API_VERSION}/changeset/:id/download", :controller => 'changeset', :action => 'download', :id => /\d+/ - map.connect "api/#{API_VERSION}/changeset/:id/include", :controller => 'changeset', :action => 'include', :id => /\d+/ + map.connect "api/#{API_VERSION}/changeset/:id/expand_bbox", :controller => 'changeset', :action => 'expand_bbox', :id => /\d+/ map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'read', :id => /\d+/, :conditions => { :method => :get } map.connect "api/#{API_VERSION}/changeset/:id", :controller => 'changeset', :action => 'update', :id => /\d+/, :conditions => { :method => :put } map.connect "api/#{API_VERSION}/changeset/:id/close", :controller => 'changeset', :action => 'close', :id =>/\d+/ diff --git a/test/functional/changeset_controller_test.rb b/test/functional/changeset_controller_test.rb index 47cd95c24..2ff6bee33 100644 --- a/test/functional/changeset_controller_test.rb +++ b/test/functional/changeset_controller_test.rb @@ -851,7 +851,7 @@ EOF # call the include method and assert properties of the bbox def check_after_include(changeset_id, lon, lat, bbox) content "" - post :include, :id => changeset_id + post :expand_bbox, :id => changeset_id assert_response :success, "Setting include of changeset failed: #{@response.body}" # check exactly one changeset