socialforge/app/models/homework_detail_programing.rb

10 lines
232 B
Ruby
Raw Normal View History

class HomeworkDetailPrograming < ActiveRecord::Base
attr_accessible :language, :standard_code, :homework_common_id
belongs_to :homework_common
2015-08-28 12:04:49 +08:00
def language_name
2015-09-24 15:09:15 +08:00
%W(C C++ Python Java).at(self.language.to_i - 1)
2015-08-28 12:04:49 +08:00
end
end