Forum: Ruby on Rails Returning :success or :failure to remote function calls

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Joerg D. (Guest)
on 2006-01-10 11:10

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?

Vivek K. (Guest)
on 2006-01-10 13:12
(Received via mailing list)
In your controller
render :nothing, :status=>200  # calls success
render :nothing ,:status=>500 #calls failure ,any status  other than 2XX
Joerg D. (Guest)
on 2006-01-10 13:14
Ah awesome - thanks.
This topic is locked and can not be replied to.