RailsCasts Pro episodes are now free!

Learn more or hide this

xphuket's Profile

GitHub User: xphuket

Comments by

Avatar

I'm using rails 4 and i got this problem after i used this code i got this error in my browser

GET http://172.26.241.33:3000/galleries/2/comments 500 (Internal Server Error) jquery.js?body=1:9667
send jquery.js?body=1:9667
jQuery.extend.ajax jquery.js?body=1:9212
jQuery.(anonymous function) jquery.js?body=1:9358
CommentPoller.request comments.js?body=1:7

and as you see, rails included "/comments" into the url with i didn't expect it. It must be just "/galleries/2"

$('#comments').html("<%= j render(@comments) %>");
CommentPoller.poll();

I suspected it must be the 1st line that makes my project error, but i don't know how or why???

please help me out or do you have another tutorial for rails 4 please let me know.