FEATURE: auto-close topics based on last post

This commit is contained in:
Régis Hanol
2014-10-10 18:21:44 +02:00
parent ac72b0bcf6
commit 5754e8dd0f
28 changed files with 242 additions and 146 deletions

View File

@ -354,7 +354,6 @@ class ApplicationController < ActionController::Base
def render_post_json(post, add_raw=true)
post_serializer = PostSerializer.new(post, scope: guardian, root: false)
post_serializer.add_raw = add_raw
post_serializer.topic_slug = post.topic.slug if post.topic.present?
counts = PostAction.counts_for([post], current_user)
if counts && counts = counts[post.id]