贴吧详情统计数修改
This commit is contained in:
parent
1ece9cb185
commit
82a3ff01ef
|
@ -187,8 +187,8 @@ class ForumsController < ApplicationController
|
|||
reorder(order).
|
||||
preload(:author, {:last_reply => :author}).
|
||||
all
|
||||
@my_topic_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is null").count
|
||||
@my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and author_id = #{User.current.id} and parent_id is not null").count
|
||||
@my_topic_count = Memo.where("forum_id = #{@memo.forum_id} and parent_id is null").count
|
||||
@my_replies_count = Memo.where("forum_id = #{@memo.forum_id} and parent_id is not null").count
|
||||
@errors = params[:errors]
|
||||
# 推荐贴吧
|
||||
@forums = Forum.where("id !=?", @forum.id).reorder("topic_count desc,updated_at desc").first(3)
|
||||
|
|
Loading…
Reference in New Issue