Caching the comments count only seems to work with a page reload. I am using ajax to add comments and updating the count in create.js.erb: $('#comments_count').html('<%= @article.comments.size %>'); ... when using the cached version the value is not yet updated at this point?
Another great cast.
Caching the comments count only seems to work with a page reload. I am using ajax to add comments and updating the count in create.js.erb:
$('#comments_count').html('<%= @article.comments.size %>');
... when using the cached version the value is not yet updated at this point?I did:
Then pass in the $index parameter when delete function is called:
delete function: