Parent

Methods

Class Index [+]

Quicksearch

Rack::MethodOverride

Constants

HTTP_METHODS
METHOD_OVERRIDE_PARAM_KEY
HTTP_METHOD_OVERRIDE_HEADER

Public Class Methods

new(app) click to toggle source
    # File lib/rack/methodoverride.rb, line 8
 8:     def initialize(app)
 9:       @app = app
10:     end

Public Instance Methods

call(env) click to toggle source
    # File lib/rack/methodoverride.rb, line 12
12:     def call(env)
13:       if env["REQUEST_METHOD"] == "POST"
14:         req = Request.new(env)
15:         method = req.POST[METHOD_OVERRIDE_PARAM_KEY] ||
16:           env[HTTP_METHOD_OVERRIDE_HEADER]
17:         method = method.to_s.upcase
18:         if HTTP_METHODS.include?(method)
19:           env["rack.methodoverride.original_method"] = env["REQUEST_METHOD"]
20:           env["REQUEST_METHOD"] = method
21:         end
22:       end
23: 
24:       @app.call(env)
25:     end

Disabled; run with --debug to generate this.

[Validate]

Generated with the Darkfish Rdoc Generator 1.1.6.