作业顺序按照截止日期排序
This commit is contained in:
parent
992d2be6e4
commit
24d7234fec
|
@ -253,7 +253,7 @@ class ProjectsController < ApplicationController
|
||||||
#Added by young
|
#Added by young
|
||||||
def homework
|
def homework
|
||||||
@offset, @limit = api_offset_and_limit({:limit => 10})
|
@offset, @limit = api_offset_and_limit({:limit => 10})
|
||||||
@bids = @project.homeworks
|
@bids = @project.homeworks.order('deadline DESC')
|
||||||
@bids = @bids.like(params[:name]) if params[:name].present?
|
@bids = @bids.like(params[:name]) if params[:name].present?
|
||||||
@bid_count = @bids.count
|
@bid_count = @bids.count
|
||||||
@bid_pages = Paginator.new @bid_count, @limit, params['page']
|
@bid_pages = Paginator.new @bid_count, @limit, params['page']
|
||||||
|
|
Loading…
Reference in New Issue