json.author do json.partial! "users/user_simple", user: message.user end json.id message.id json.content message.contents_show(identity) json.time time_from_now(message.created_at) json.hidden message.hidden # 主贴与子贴不一致 if message.m_parent_id json.can_delete message.can_delete(identity) else json.praise_count message.praise_treads.liker.count json.user_praise message.praise_treads.user_liker(current_user).count json.child_message_count message.m_reply_count end