From 12d70c69995219613c253b6c9e48ca60ff599465 Mon Sep 17 00:00:00 2001 From: cxt Date: Sat, 8 Oct 2016 18:06:09 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=86=E7=BB=84=E4=BD=9C=E4=B8=9A=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E6=97=B6=E2=80=9C=E5=9F=BA=E4=BA=8E=E9=A1=B9=E7=9B=AE?= =?UTF-8?q?=E5=AE=9E=E6=96=BD=E2=80=9D=E7=9A=84=E8=AE=BE=E7=BD=AE=E4=B8=8D?= =?UTF-8?q?=E8=B5=B7=E4=BD=9C=E7=94=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile | 4 ++-- app/controllers/homework_common_controller.rb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index cbeade2a3..416ef3b98 100644 --- a/Gemfile +++ b/Gemfile @@ -50,10 +50,10 @@ gem 'elasticsearch-model' gem 'elasticsearch-rails' #rails 3.2.22.2 bug - gem "test-unit", "~>3.0" + #gem "test-unit", "~>3.0" ### profile - gem 'oneapm_rpm' + #gem 'oneapm_rpm' group :development do gem 'grape-swagger' diff --git a/app/controllers/homework_common_controller.rb b/app/controllers/homework_common_controller.rb index 4511e5a1f..c82c1f947 100644 --- a/app/controllers/homework_common_controller.rb +++ b/app/controllers/homework_common_controller.rb @@ -146,7 +146,7 @@ class HomeworkCommonController < ApplicationController @homework_detail_group = @homework.homework_detail_group @homework_detail_group.min_num = params[:min_num].to_i if params[:min_num] @homework_detail_group.max_num = params[:max_num].to_i if params[:max_num] - @homework_detail_group.base_on_project = params[:base_on_project].to_i if params[:base_on_project] + @homework_detail_group.base_on_project = params[:base_on_project] ? 1 : 0 end @homework.anonymous_comment = params[:homework_common][:anonymous_comment] ? params[:homework_common][:anonymous_comment].to_i : 1