Returning :success or :failure to remote function calls


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?


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

Ah awesome - thanks.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs