Returning :success or :failure to remote function calls


#1

Hi,

When calling remote functions (AJAX), I can test for :success and
:failure. But how do I return a :success or :failure to my AJAX function
call from my action?

Thanks
Joerg


#2

In your controller
render :nothing, :status=>200 # calls success
render :nothing ,:status=>500 #calls failure ,any status other than 2XX


#3

Ah awesome - thanks.