mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 03:37:56 +01:00
Add sort by filter to post list (#271)
This commit is contained in:
committed by
GitHub
parent
fadd577db8
commit
9c5553cc32
@@ -18,7 +18,7 @@ class PostsController < ApplicationController
|
||||
.group('posts.id')
|
||||
.where(board_id: params[:board_id] || Board.first.id)
|
||||
.search_by_name_or_description(params[:search])
|
||||
.order('hotness DESC')
|
||||
.order_by(params[:sort_by])
|
||||
.page(params[:page])
|
||||
|
||||
# apply post status filter if present
|
||||
|
||||
Reference in New Issue
Block a user