- User sees article without the question
- User clicks pagination or posts a comment
- Comments are refreshed showing the latest comments (old comments + all new since you posted)
- User still sees article without the question
- User now navigates to page 5 and sees someone answered the question while the article (to him) doesn't contain the question
- User rages!
- User takes screenshot of Hans saying he will post at 18:30, Hans posted at ~18:29:20
Comments are refreshed every time you post a comment or click a page in the navigation, without refreshing the rest of the article. This is what happened. If someone would be cheating we'd be sure to catch them.
$('.js-comments-container').html('<%= j render :partial => "shared/comment/list", :locals => { :entity => @article, :comments => @comments } %>');
$('.timeago').timeago();
<% cache(cache_key_for_comments(@article, comments, (params[:page] || "first")) ) do %>
<%= render :partial => "shared/comment/light_comment", :collection => comments, :locals => { :entity => entity } %>
<% end %>
<% cache ["v1", light_comment] do %>
<li class="comment">
<article class="comments--comment">
<figure class="avatar small" role="author-avatar">
<%= UserDecorator.decorate(comment.user).avatar if comment.user.present? %>
<% if comment.user.present? && comment.user.guild.present? %>
<%= UserDecorator.decorate(comment.user).guild_logo %>
<% end %>
</figure>
<div class="comments--body" role="comment-body">
<span class="comments--meta">
<% if comment.user.present? %>
<%= link_to comment.user.name, comment.user %> <small><%= timeago(comment.created_at) %></small> —
<% end %>
</span>
<span class="js-comment-body">
<%= sanitize(comment.body).gsub("\r\n", "<br/>").html_safe %>
<% if user_signed_in? %>
<i class="icon-reply js-reply tipme" title="Reply" data-placement="top"></i>
<% end %>
</span>
</div>
</article>
</li>
<% end %>