Displaying 1 result from an estimated 1 matches for "comment_par".
Did you mean:
  comment_ptr
  
2010 Sep 17
25
Trying to look up comment through an ID, but failing
...ill 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| %>
    <%#= render ''shared/error_messages'', :object => f.object %>
    <div class="field">
      <%= f.label :title %><br />
      <%= f.tex...