add: project order index
This commit is contained in:
parent
1a8d9bb0ce
commit
9553740960
|
@ -15,7 +15,7 @@ class Projects::ListQuery < ApplicationQuery
|
|||
scope = q
|
||||
.with_project_type(params[:project_type])
|
||||
.with_project_category(params[:category_id])
|
||||
.with_project_language(params[:language_id])
|
||||
.with_project_language(params[:language_id]).order(order_index: :desc)
|
||||
|
||||
sort = params[:sort_by] || "updated_on"
|
||||
sort_direction = params[:sort_direction] || "desc"
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
class AddOrderIndexToProject < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :projects, :order_index, :integer, default: 0
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue