[Rails] link_to_remote parameters - help

ry an
2006-08-24T20:01:24Z

I''m trying to show a preview of the comments, and I''m saving
the
comments through AJAX.  So, I thought that I should be able to mimic the
"comments" action for the "comments_preview" action very
easily.  So
far, this isn''t the case.

I have a link_to_remote tag inside of the form tag, and I don''t know
how
to send the parameters that are within the form (name, site, comment)
and the id of the post it''s on (to get the current count of entries,
but
that''s not as important).  Basically, I don''t know how to send
the
comment parameters using link_to_remote, so that I can use them in my
controller like so:

@comment = Comment.new(params[:comment])

Then just use the @comment in the "comments_preview.rhtml" view to
display a preview... I was using the post id to get the
Comment.count("post_id=#{params[:id]}").

How can I send all of this data to the controller?  Thanks!

--
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk
-~----------~----~----~----~------~----~------~--~---