tag:blogger.com,1999:blog-32765306.post625507129639473691..comments2023-02-15T09:11:42.671+00:00Comments on Rich Text: Handling Errors in Ajax & RailsRichard Robertshttp://www.blogger.com/profile/04326338536973407003noreply@blogger.comBlogger2125tag:blogger.com,1999:blog-32765306.post-47359736957941749912008-02-06T09:42:00.000+00:002008-02-06T09:42:00.000+00:00Thanks jorrel.I hadn't thought of using repsond_to...Thanks jorrel.<BR/><BR/>I hadn't thought of using repsond_to.<BR/><BR/>I think what you've suggested will work for capturing any errors in ajax calls. <BR/><BR/>My way has the potential benefit/downside (depending on which way you look at it) of restricting the method with the filter to only be callable by ajax.<BR/><BR/>I think I'll consider this some more. Thanks for the ideas.Richard Robertshttps://www.blogger.com/profile/04326338536973407003noreply@blogger.comtag:blogger.com,1999:blog-32765306.post-64993482584591787512008-02-06T04:49:00.000+00:002008-02-06T04:49:00.000+00:00um can you just modify the rescue_action_in_public...um can you just modify the rescue_action_in_public hook?<BR/><BR/>I mean:<BR/>def render_action_in_public(exception)<BR/> respond_to do |format|<BR/> format.html { render :file => "public/error.html" }<BR/> format.js do<BR/> render :update do |page|<BR/> page.redirect_to "public/error.html"<BR/> end<BR/> end<BR/> end<BR/>endjorrelhttps://www.blogger.com/profile/04251207624235828396noreply@blogger.com