Merge branch 'dev_raining' of https://git.trustie.net/jacknudt/trustieforge into dev_raining
This commit is contained in:
commit
6f06fde7dc
|
@ -143,7 +143,7 @@ class ForumsController < ApplicationController
|
|||
reorder(order).
|
||||
preload(:author, {:last_reply => :author}).
|
||||
all
|
||||
@forums = Forum.reorder("topic_count desc,updated_at desc")
|
||||
@forums = Forum.find_by_sql("SELECT *,topic_count + memo_count tm FROM `forums` order by tm desc;")
|
||||
@my_forums_count = Memo.where("author_id =? and parent_id is null", User.current.id).count
|
||||
@my_memos_count = Memo.where("author_id =? and parent_id is not null", User.current.id).count
|
||||
@errors = params[:errors]
|
||||
|
|
Loading…
Reference in New Issue