You don''t need separate controller - action in existing controller is
enough. Just make sure that action does not use layouts and only responds
with the required data that can be processed by javascript
On 3/24/06, tyler <tyler@tylerc.net> wrote:>
> 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?
> myurl.com/photos/addcomment and post to that controller... or?
>
> Any suggestions?
>
> Thanks in advance
> tyler
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060324/0bd1323d/attachment.html