https://github.com/baroquebobcat/rack-methodoverride-with-params
Rack::MethodOverride, but it checks query params too.
https://github.com/baroquebobcat/rack-methodoverride-with-params
Last synced: 3 months ago
JSON representation
Rack::MethodOverride, but it checks query params too.
- Host: GitHub
- URL: https://github.com/baroquebobcat/rack-methodoverride-with-params
- Owner: baroquebobcat
- License: mit
- Created: 2010-09-29T03:34:02.000Z (almost 15 years ago)
- Default Branch: master
- Last Pushed: 2011-07-20T22:40:05.000Z (almost 14 years ago)
- Last Synced: 2025-04-14T03:38:33.597Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 96.7 KB
- Stars: 13
- Watchers: 1
- Forks: 7
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this 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::MethodOverrideWithParamsto 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.