init project

This commit is contained in:
Jasder
2020-03-09 00:40:16 +08:00
commit 2937b2a94d
6549 changed files with 7215173 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
class ProgramBank < ApplicationRecord
def oj_language
result = case language
when '1'
then 'C'
when '2'
then 'C++'
when '3'
then 'Python'
when '4'
then 'Java'
end
result
end
def strip_description
strip_html description
end
def oj_sub_discipline_id
result = case language
when '1'
then 3
when '2'
then 4
when '3'
then 5
when '4'
then 2
end
result
end
end