Forum: Ruby on Rails Ajax and comments - HELP

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1e2dd87a31c5d3e07adc9efa375f4dc4?d=identicon&s=25 ryan (Guest)
on 2006-03-16 14:40
I've got my site posting comments with ajax, but I can't seem to handle
the callback correctly.

Do I just put what I want returned in the "comments.rhtml" file?  I've
been trying to do this, but am having no luck.

If I have the parameters for the comments, I should be able to single
them out, but I'm not sure how to do it.  This is what I mean:

<%=params[:comments]%> #returns name, site, comment, but not
individually.

How can I do this essentially (without getting errors),

<%=params[:comments.name]%>
<%=params[:comments.site]%>
<%=params[:comments.created_at]%>
<%=params[:comments.entry]%>

Also, when I try to use strftime in "comments.rhtml" it says that it's
undefined.

I don't even know if the above things that I mentioned are even the
right way to go about it, I just don't know how to do it.

The comments are saving to the database fine, but I have to refresh the
page to get it to show up.  Also, I would like to use
"Effect.Appear('new-comment')" oncomplete.  This doesn't seem to be
working either.

Can someone tell me how to display the comment after an Ajax submission?

Please HELP!

Thanks!
This topic is locked and can not be replied to.