ラックミドルウェアを使用してテンプレートの本文を印刷したい. 以下は私の設定です...
#config/initializers/response_timer.rb
class ResponseTimer
def initialize(app)
@app = app
end
def call(env)
status, headers, response = @app.call(env)
[status, headers, response.body]
end
end
#application.rb file
config.middleware.use "ResponseTimer"
domainname/students/ をリクエストしたときに、以下のエラーが発生しています。
undefined method `each' for #<String:0xd69a2e0>
助けてください。