json.memo_list @memos # do |memo| # json.(memo, :id, :updated_at, :reward) # json.subject message_content(memo.content) # json.praise_count memo.praises_count # json.replies_count memo.child_discuss_count # json.shixun_tag memo.dis.tag_repertoires.map(&:name) # json.username memo.user.full_name # json.login memo.user.login # json.image_url url_to_avatar(memo.user) # json.tpm_url "/shixuns/#{memo.dis.identifier}/shixun_discuss" # end json.memo_count @memo_count json.hot_memos do json.array! @hot_memos do |hm| json.(hm, :id, :subject, :language, :forum_id) json.replies_count hm.all_replies_count # json.praise_count hm.praise_tread.praise_count json.tag hm.tag_repertoires.map(&:name) end end json.hot_tags @hot_tags json.recommend_shixuns @recommend_shixuns