No commit activity in last 3 years
No release in over 3 years
Rack::MethodOverride only checks the X-Http-Method-Override header and the form encoded post body for _method. Rack::MethodOverrideWithParams checks both of those _and_ the query params. So, if you POST xml with a url like http://example.com/?_method=delete the application will see it as a delete request.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 2

Runtime

~> 1
 Project Readme

Rack MethodOverride With Params

Rack MethodOverride With Params solves the issue where POST requests with _method as a query param do not use _method's value as the HTTP method in Rails etc that use Rack MethodOverride.

It does this by extending Rack::MethodOverride and overriding it so it looks at both query params and form params. So you can use it anywhere you were using Rack::MethodOverride

To use it with Rack Builder

require 'rack-methodoverride-with-params'
#...
use Rack::MethodOverrideWithParams

to use it with Rails

add it to the Gemfile

gem 'rack-methodoverride-with-params'

swap Rack::MethodOverride in config/environment.rb

config.middleware.swap Rack::MethodOverride, Rack::MethodOverrideWithParams

Contrib

There is not much here, but if you want to play around, clone the project, run the specs and hack away.

I probably won't be actively working on this much as it is really simple, but if you ping me about it on github or twitter(I'm baroquebobcat), I'll help you out.