a8ccb349
770f43a
@@ -6,10 +6,8 @@ var disqus_identifier = '<%= id %>'; var disqus_config = function(){ this.page.remote_auth_s3 = '<%= disqus_auth %>'; this.page.api_key = '<%= ENV['DISQUS_API_KEY'] %>'; - this.callbacks.onNewComment = [function(comment) { - $.post("/comments", { id: comment.id, url: document.URL, comment: comment }, function(result){ - console.log(result); - }); + this.callbacks.onNewComment = [function(comment) { + $.post('<%= comments_path %>', { id: comment.id, url: document.URL, comment: comment }, function(result){ console.log(result); }); }]; }; <% end %>