* Use ancestry in the index and add test * Add tests for show action * Return complete comments trees for index, kill n+1 and use correct edge cache key * Return complete comments tree for show, kill n+1 and use correct edge cache key * Refactor tests and add surrogate keys tests * Preload users for the whole subtree * Clarify explanation of the edge cache keys construction * Refactor partials * Remove action caching * Replace .map.flatten with .flat_map * Fix surrogate key prefix according to Fastly docs * Add comment.purge to Comments::BustCacheJob to use Fastly-Rails * Fix surrogate key spec
6 lines
166 B
Ruby
6 lines
166 B
Ruby
json.partial! "comment", comment: comment
|
|
|
|
# recursively render the comment subtree
|
|
json.children do
|
|
json.partial! "comments_with_children", comments: children
|
|
end
|