Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[tlug] [ruby on rails]: sending back HTTP status codes with XHR



Hi,

so it looks like I'm in the process of learning some RoR.
And obviously I'm facing problems from time to time, one of which is:

using the link_to_remote helper there's that nice feature that allows
you to update different DOM objects depending on the outcome of the
server response, so 

  link_to_remote h(truncate(message_item.subject, 60)),
       :url => { :action => "read_message", :uid => message_item.uid .... },
       :update => { :success => "content", :failure => "error" },
       :loading => 'loading_show()',
       :loaded => 'loading_hide()'

Nice, but how the hell I'm supposed to send back an HTTP 500?
I tried overriding the rescue_action in the controller (which I supposed
would automagically return 5xx codes) to no avail.

Hints?
-- 
mattia
:wq!


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links