Class: Rack::Initforthe::Facebook::MethodFix
- Inherits:
-
Object
- Object
- Rack::Initforthe::Facebook::MethodFix
- Defined in:
- lib/rack/initforthe/facebook/method_fix.rb
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app, options = {}) ⇒ MethodFix
constructor
A new instance of MethodFix.
Constructor Details
#initialize(app, options = {}) ⇒ MethodFix
Returns a new instance of MethodFix.
5 6 7 |
# File 'lib/rack/initforthe/facebook/method_fix.rb', line 5 def initialize(app, = {}) @app = app end |
Instance Method Details
#call(env) ⇒ Object
9 10 11 12 13 14 15 |
# File 'lib/rack/initforthe/facebook/method_fix.rb', line 9 def call(env) request = Request.new(env) if !request.params['signed_request'].nil? && env['REQUEST_METHOD'] == 'POST' env['REQUEST_METHOD'] = 'GET' end @app.call(env) end |