Forum: Ruby on Rails Using the same action in AJAX 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.
Bd0ecd69dba2aab1a0261ee46e090139?d=identicon&s=25 Nicholas Wieland (Guest)
on 2007-03-07 14:53
(Received via mailing list)
Hi *,
I display a form after a link_to_remote where I edit some object
attributes. Actually I need 2 controller actions, edit (this one
displays the form) and do_edit (this one changes the attributes in
the db). I'd like to do the same thing I do for normal non-AJAX
actions with to use the same action (in my case 'edit')
for both, in one case render a partial in the other update the db and
render a partial, or fail the update and redisplay the remote_form_for.
They are both request.xhr? AFAIK, so actually I don't know how to
solve this one ...
Someone already tried ?

This topic is locked and can not be replied to.