@ -33,6 +33,12 @@ module ApplicationHelper
Base64.urlsafe_encode64(content)
end
# 替换换行和tab键
def regexp_msg content
return nil if content.blank?
content.gsub(/\n/, '<br/>').gsub(/\t/, " \; \; \; \; \; \; \; \;")
def graduation_navigation graduation
graduation.class.to_s == "GraduationTopic" ? "毕设选题" : "毕设任务"
@ -1,7 +1,7 @@
json.status 0
json.message "返回成功"
json.data do
json.(@hack_user, :id, :status, :error_line, :error_msg, :expected_output,
json.(@hack_user, :id, :status, :error_line, :expected_output, :error_msg,
:input, :output, :execute_time, :execute_memory, :created_at, :code)
json.language @hack_user.language
json.name @hack_user.hack.name