mod actions: update /mod_actions index.
* Add newest and oldest order options. * Rearrange columns to match /user_actions page.
This commit is contained in:
@@ -82,7 +82,14 @@ class ModAction < ApplicationRecord
|
||||
q = search_attributes(params, :id, :created_at, :updated_at, :category, :description, :creator)
|
||||
q = q.text_attribute_matches(:description, params[:description_matches])
|
||||
|
||||
q.apply_default_order(params)
|
||||
case params[:order]
|
||||
when "created_at_asc"
|
||||
q = q.order(created_at: :asc, id: :asc)
|
||||
else
|
||||
q = q.apply_default_order(params)
|
||||
end
|
||||
|
||||
q
|
||||
end
|
||||
|
||||
def category_id
|
||||
|
||||
Reference in New Issue
Block a user