修改代码测试列表报500

This commit is contained in:
yuanke 2016-04-20 16:13:06 +08:00
parent c6174406fb
commit ff177557c8
1 changed files with 3 additions and 2 deletions

View File

@ -600,8 +600,9 @@ class AdminController < ApplicationController
#设置个空的数组 以便paginateHelper来分页
@code_work_tests = []
@code_work_tests[tCount-1] = {}
if tCount >= 1
@code_work_tests[tCount-1] = {}
end
@code_work_tests = paginateHelper @code_work_tests,30
@page = (params['page'] || 1).to_i - 1