Created
October 30, 2012 11:20
-
-
Save babatakao/3979673 to your computer and use it in GitHub Desktop.
Rails 3.2でproduction環境の時にHEADメソッド(request.head?)が動作しない不具合を修正するパッチ
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file is used by Rack-based servers to start the application. | |
class SaveOriginalHttpMethod | |
def initialize(app) | |
@app = app | |
end | |
def call(env) | |
env['rack.methodoverride.original_method'] = env['REQUEST_METHOD'] | |
@app.call(env) | |
end | |
end | |
use SaveOriginalHttpMethod | |
require ::File.expand_path('../config/environment', __FILE__) | |
run MyApp::Application |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment