Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # app/config/environments/development.rb
- # Middleware to print to the screen so I can see the responses when streaming data
- config.middleware.use(
- Class.new do
- def initialize(app)
- @app = app
- end
- def call(env)
- status, headers, response = @app.call(env)
- response.each do |r|
- puts "########### REQUEST ##########\n"
- end
- [status, headers, response]
- end
- end
- )
Add Comment
Please, Sign In to add comment