def call(env)
status, headers, response = @app.call(env)
if response.is_a? Array
puts response.inspect
else
puts response.class.to_s
end
[status, headers, response]
end
From development.log:
First request:
Completed 200 OK in 95ms (Views: 35.9ms | ActiveRecord: 1.5ms)
ActionDispatch::Response
Second and other requests:
Completed 200 OK in 77ms (Views: 76.3ms | ActiveRecord: 0.0ms)
[]
response is a: ActionDispatch::Response
the first time a route gets called,
for any other requests for that exact url, it is an empty Array
Page renders successfully in both cases, but I can't use response.body
when response is an empty array.
Is this normal Rails behavior? Is there some caching here even in dev environment?