class ModifyTaskPassForChallenges < ActiveRecord::Migration[5.2] def change Challenge.find_each do |challenge| task_pass = challenge.task_pass.gsub(" ", "").gsub("rac", '\frac') challenge.update_attribute(:task_pass, task_pass) end end end