Displaying 3 results from an estimated 3 matches for "new_comment_path".
2011 Jul 27
20
Rails, jquery and Ajax
How do I make an ajax call and then update a div with a partial? I''ve
tried this but it''s not working. Comment is created but the partial is
not loaded.
//view
<a href="#" id="testlink">Testlink</a>
<div id="commentlist">
</div>
//controller
def new
@comment = Comment.new
@comment.save
2008 Jul 16
2
params for link_to_remote
...thing works fine, but ''link_to_remote'' doesnt work with :params :-
(
here is my code of the article view:
<div id="editor">
</div>
<%= link_to_remote("new comment", :update =>
''editor'', :url => new_comment_path,
:params => {:article_id => @article.id}) %>
My db layout: http://erdbeere.net/media/db_layout.png
If anyone have an idea i would be happy to read it^^. I used google to
find any useful information, but i failed. The only parameter I found
is '':with'...
2010 Sep 17
25
Trying to look up comment through an ID, but failing
I am trying to allow users to reply through comments by allowing users
to click a reply link next to the parent comment. It will send in a
parameter to the ''new'' comment view, like so:
| <%= link_to "Reply", new_comment_path(:in_reply_to => comment.id) %>
The form will use the :in_reply_to parameter in order to save that id as
the parent id, like so:
comments_controller#new:
@comment_parent = Comment.find(params[:in_reply_to])
comments_form view:
<%= form_for([@comment]) do |f| %>
<%#= rende...