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 :
<%= f.submit "Add comment" %> <% end %>
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!