docs
[sinatra.git] / lib / sinatra / rack_ext / request.rb
blobf0c928c022fe9d84d58faf6eb39ac84e44fe2165
1 module Rack #:nodoc:
2   
3   class Request #:nodoc:
4     
5     def request_method
6       if @env['REQUEST_METHOD'] == 'POST' && %w(PUT DELETE).include?(params['_method'])
7         params['_method'].upcase
8       else
9         @env['REQUEST_METHOD']
10       end
11     end
12     
13   end
14   
15 end