Forum: Ruby on Rails AJAX & Posting Reccomendation

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.
tyler (Guest)
on 2006-03-24 17:15
I'm currently developing a photo gallery website with Rails.  Each photo
can be commented upon.  What I'd like to do is, once the user posts a
comment, use AJAX to submit the comment and then automatically update
the page with the comment the user just submitted.

I also don't want to use Prototype or the built in AJAX that comes with
Rails... it's too fat for what I need.  I can write the javascript to
handle this without a problem.

If this were in PHP/Perl, I'd just use javascript to post the data to a
php/cgi file.  However, I'm a little  unsure of the best way to approach
this with Rails.  Would I create a controller just for this? and post to that controller... or?

Any suggestions?

Thanks in advance
Emin H. (Guest)
on 2006-03-24 21:33
(Received via mailing list)
You don't need separate controller - action in existing controller is
enough. Just make sure that action does not use layouts and only
with the required data that can be processed by javascript
This topic is locked and can not be replied to.