it hits the controller action in PDF format, that opens a ferrum browser and visits the controller action in HTML format:
# app/controllers/projects_controller.rb
def index
respond_to do |format|
format.html
format.pdf do
browser = Ferrum::Browser.new
browser.go_to(projects_path)
browser.pdf
end
end
end
In this case I will often get the Ferrum::PendingConnectionsError error with Request to http://localhost:3000/projects reached server, but there are still pending connections: http:/localhost:3000/projects
Are there some best practices to follow to avoid this error?
In my app I want to have a "generate pdf" controller action
Scenario:
when a user clicks
it hits the controller action in PDF format, that opens a ferrum browser and visits the controller action in HTML format:
In this case I will often get the
Ferrum::PendingConnectionsError
error withRequest to http://localhost:3000/projects reached server, but there are still pending connections: http:/localhost:3000/projects
Are there some best practices to follow to avoid this error?