From: Tom Hughes Date: Wed, 14 Mar 2012 13:44:03 +0000 (+0000) Subject: Allow POST requests to the home page so OpenSearch works X-Git-Tag: live~5819 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/21855aa355ed66bea0ae21acb3d675aeaccc963b?hp=05aa7f377e15b809d7b73e0bfb5d9d3849b5458f Allow POST requests to the home page so OpenSearch works --- diff --git a/config/routes.rb b/config/routes.rb index 5952bae52..c8d9a99ee 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -92,7 +92,7 @@ OpenStreetMap::Application.routes.draw do match '/browse' => 'changeset#list', :via => :get # web site - root :to => 'site#index', :via => :get + root :to => 'site#index', :via => [:get, :post] match '/edit' => 'site#edit', :via => :get match '/copyright/:copyright_locale' => 'site#copyright', :via => :get match '/copyright' => 'site#copyright', :via => :get diff --git a/test/functional/site_controller_test.rb b/test/functional/site_controller_test.rb index caef3481b..3f9e2a145 100644 --- a/test/functional/site_controller_test.rb +++ b/test/functional/site_controller_test.rb @@ -10,6 +10,10 @@ class SiteControllerTest < ActionController::TestCase { :path => "/", :method => :get }, { :controller => "site", :action => "index" } ) + assert_routing( + { :path => "/", :method => :post }, + { :controller => "site", :action => "index" } + ) assert_recognizes( { :controller => "site", :action => "index" }, { :path => "/index.html", :method => :get }