From 21855aa355ed66bea0ae21acb3d675aeaccc963b Mon Sep 17 00:00:00 2001 From: Tom Hughes Date: Wed, 14 Mar 2012 13:44:03 +0000 Subject: [PATCH] Allow POST requests to the home page so OpenSearch works --- config/routes.rb | 2 +- test/functional/site_controller_test.rb | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) 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 } -- 2.43.2