From 4f9e07d3d0406b2ac188c7eb770a5be5da3d7dec Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 9 Sep 2019 17:48:26 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=9B=86=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/challenges_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/challenges_controller.rb b/app/controllers/challenges_controller.rb index 7a5675b4f..0008e470d 100644 --- a/app/controllers/challenges_controller.rb +++ b/app/controllers/challenges_controller.rb @@ -200,7 +200,7 @@ class ChallengesController < ApplicationController test_set.delete_all unless test_set.blank? params[:test_set].each_with_index do |set, index| # last: 末尾匹配, full: 全完匹配 - match_rule = params[:match_rule] == 'last' ? 'last' : 'full' + match_rule = set[:match_rule] == 'last' ? 'last' : 'full' TestSet.create(:challenge_id => @challenge.id, :input => "#{set[:input]}", :output => "#{set[:output]}",