Guest User

Untitled

a guest
Jun 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. # app/config/environments/development.rb
  2. # Middleware to print to the screen so I can see the responses when streaming data
  3. config.middleware.use(
  4. Class.new do
  5.  
  6. def initialize(app)
  7. @app = app
  8. end
  9.  
  10. def call(env)
  11. status, headers, response = @app.call(env)
  12. response.each do |r|
  13. puts "########### REQUEST ##########\n"
  14. end
  15. [status, headers, response]
  16. end
  17.  
  18. end
  19. )
Add Comment
Please, Sign In to add comment