I have one rails application where I am using Disqus Universal Code for comment function. I am using ajax remote => true function to display my posts content. Here is my disqus code
<div id="disqus_thread"></div>
<script type="text/javascript">
var disqus_shortname = 'ginfy';
var disqus_identifier = '<%= @posts.id %>';
(function() {
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
})();
</script>
<noscript>Please enable JavaScript to view the <a href="http://disqus.com/?ref_noscript">comments powered by Disqus.</a></noscript>
I know that Disqus depends on Site URL and it takes different thread based on different URL but here i am using AJAX [No CHANGE IN URL]. check my erb-
<%= link_to "Read more","prayers/#{posts_item.id}",:remote => "true" %>
When I click on read more then Disqus always open with same Thread. I want Different disqus thread for different posts without sacrificing my Ajax functionality.
I already checked all the question related to this problem but nothing gave me solution. Please help me.