Updated Group model to search for sort by most member_count
• Updated: - Group model to search for sort by most member_count
This commit is contained in:
parent
5fc517473f
commit
f7bf7e2263
@ -53,7 +53,7 @@ class Group < ApplicationRecord
|
||||
pattern = sanitize_sql_like(term.strip) + '%'
|
||||
|
||||
Group.where('lower(title) like lower(?) AND is_archived=false AND is_visible=true', pattern)
|
||||
.order(:title)
|
||||
.order('member_count DESC')
|
||||
.limit(limit)
|
||||
.offset(offset)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user