Kelp Kelp wrote: > > comments_controller#new: > @comment_parent = Comment.find(params[:in_reply_to]) >
Why not just: @comment = Comment.new @comment.parent_id = params[:in_reply_to] if params[:in_reply_to] > </div> > <%= f.hidden_field :parent_id, :value => @comment_parent.id %> and skip the :value assignment in the view, the value is already there and you shouldn't need any of this... > @comment_parent = Comment.find(params[:parent_id]) > @comment_parent.children << @comment Unless a day spent in WCF has corrupted my brain too much... -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.