From 86e9ec068f6b2831cd7d5ae566715803826fd1d0 Mon Sep 17 00:00:00 2001 From: sw <939547590@qq.com> Date: Sat, 29 Aug 2015 11:12:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E5=BB=BA=E4=BD=9C=E4=B8=9A=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E4=BD=9C=E4=B8=9A=E6=88=AA=E6=AD=A2=E6=97=B6=E9=97=B4?= =?UTF-8?q?=E4=B8=BA=E7=A9=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/users_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index 555c67d13..a95559554 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -352,7 +352,7 @@ class UsersController < ApplicationController homework = HomeworkCommon.new homework.name = params[:homework_common][:name] homework.description = params[:homework_common][:description] - homework.end_time = params[:homework_common][:end_time] + homework.end_time = params[:homework_common][:end_time] || Time.now homework.publish_time = Time.now homework.homework_type = 1 homework.late_penalty = 2