I'm using Private Pub which is a gem built on top of Faye for live updating through my controller. I'm having trouble to be able to make a fallback for the Live Update Render, in case Faye server failed to serve.
Is there anyway to go around this situation and render second time if my first render method failed?
Here is my
#assigning objects and such happening here
rescue => exception
end # end rescue
Render and/or redirect were called multiple times in this action.
Please note that you may only call render OR redirect, and at most
once per action. Also note that neither redirect nor render terminate
execution of the action, so if you want to exit an action after
redirecting, you need to do something like "redirect_to(...) and
return". app/controllers/my_controller.rb130:in `block
(2 levels) in normalAjaxRender'
In order to avoid the redundancy of the Rendering this is what I did:
normalAjaxRender() method as default and in the
JS file I added