You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have done the implementation of threaded comments by using the acts_as_commentable_with_threading gem and everything is fine but I cannot seem to be able to implement ajax for it.
I have implemented in comments that were not threaded but with threaded comments I don't seem to be able to do it.
$('#comments').append('<%= j render @comment %>');
This line is the problem but I don't know how to make it work. If I change :
$('#comments').append('Hi!');
It works so there is no ajax fault it must be the <%= j render @comment %> The comments get created but it doesn't get appended to the page. I get this error
I have done the implementation of threaded comments by using the acts_as_commentable_with_threading gem and everything is fine but I cannot seem to be able to implement ajax for it.
I have implemented in comments that were not threaded but with threaded comments I don't seem to be able to do it.
$('#comments').append('<%= j render @comment %>');
This line is the problem but I don't know how to make it work. If I change :
$('#comments').append('Hi!');
It works so there is no ajax fault it must be the <%= j render @comment %> The comments get created but it doesn't get appended to the page. I get this error
POST http://localhost:3000/comments 500 (Internal Server Error)
I followed this tutorial for the implementation of the plain threaded comments http://dustinfisher.com/acts-as-commentable-with-threading-gem/
Please If you know let me now on where the problem is.
http://stackoverflow.com/questions/36227467/acts-as-commentable-with-threading-ajax-not-working
Edit This error also pops in the terminal for commentable and new_comment ActionView::Template::Error (undefined local variable or method `commentable' for #<#:0x0000000c396398>):
The text was updated successfully, but these errors were encountered: