socialforge/app/models/homework_detail_programing.rb

10 lines
220 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
%W(C C++).at(self.language.to_i - 1)
2015-08-28 12:04:49 +08:00
end
end