diff --git a/app/controllers/concerns/git_helper.rb b/app/controllers/concerns/git_helper.rb index 445d67087..f40e18e1c 100644 --- a/app/controllers/concerns/git_helper.rb +++ b/app/controllers/concerns/git_helper.rb @@ -53,9 +53,4 @@ module GitHelper container.update_attributes!(:repo_name => new_repo_name) end - #实训题的关卡url初始化 - def challenge_path(path) - cha_path = path.present? ? path.split(";") : [] - cha_path.reject(&:blank?)[0].try(:strip) - end end \ No newline at end of file diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index 32c4438a6..0cdfeba06 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -332,6 +332,12 @@ module ApplicationHelper raw arr.join('') end + + #实训题的关卡url初始化 + def challenge_path(path) + cha_path = path.present? ? path.split(";") : [] + cha_path.reject(&:blank?)[0].try(:strip) + end end