From e5e24d545521de2dd6582f96bd703a1e2714796d Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Mon, 23 Dec 2019 19:43:09 +0800 Subject: [PATCH] 1 --- db/migrate/20191223113620_modify_task_pass_for_challenges.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/db/migrate/20191223113620_modify_task_pass_for_challenges.rb b/db/migrate/20191223113620_modify_task_pass_for_challenges.rb index cfcb77fc7..f0d04f964 100644 --- a/db/migrate/20191223113620_modify_task_pass_for_challenges.rb +++ b/db/migrate/20191223113620_modify_task_pass_for_challenges.rb @@ -1,6 +1,7 @@ class ModifyTaskPassForChallenges < ActiveRecord::Migration[5.2] def change challenge = Challenge.find(6917) - challenge.update_attribute(:task_pass, challenge.task_pass.gsub(" ", "").gsub("rac", "\frac")) + task_pass = challenge.task_pass.gsub(" ", "").gsub("rac", '\frac') + challenge.update_attribute(:task_pass, task_pass) end end