Hi guys. I`m having this kind of problem: i have the comments tree, there`s this link_to_function under each one:
link_to_function "Reply", "$('comment_parent_id').setValue(#{comment.id});" as you see it simply passes comment.id to my form. Form looks like this : <div id="main-comment-form" > <%form_for :comment, :url => {:controller =>'events', :action =>'post_comment'} do |f| %> <%= f.hidden_field :parent_id, :value => nil %> <%= f.text_area :comment %><br> <%= f.submit "Add comment" %> <% end %> </div> i render both form and comments from partials. I need to somehow change this: link_to_function "Reply", "$('comment_parent_id').setValue(#{comment.id});" to link_to_remote ( i want to open the form right under the comment after clicking the link) and keep the function to pass the comment.id any ideas/theory/suggestions are much appreciated! 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@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 -~----------~----~----~----~------~----~------~--~---