class HomeworkDetailPrograming < ActiveRecord::Base
attr_accessible :language, :standard_code, :homework_common_id
belongs_to :homework_common
def language_name
%W(c c++).at(self.language.to_i - 1)
end