mirror of
https://github.com/ENSL/ensl.org.git
synced 2025-01-17 23:21:14 +00:00
Return distinct topics
This commit is contained in:
parent
bafb67f702
commit
fc7dd7286e
1 changed files with 1 additions and 1 deletions
|
@ -43,7 +43,7 @@ class Topic < ActiveRecord::Base
|
|||
|
||||
def self.recent_topics
|
||||
find_by_sql %q{
|
||||
SELECT topics.*
|
||||
SELECT DISTINCT topics.*
|
||||
FROM (SELECT max(id) as max_id, topic_id
|
||||
FROM posts
|
||||
GROUP BY topic_id
|
||||
|
|
Loading…
Reference in a new issue