Merge branch 'szzh' of http://xianbo_trustie2@repository.trustie.net/xianbo/trustie2.git into szzh
commit
a8d19a119a
@ -0,0 +1,18 @@
|
|||||||
|
module Mobile
|
||||||
|
module Entities
|
||||||
|
class Homeworkscore < Grape::Entity
|
||||||
|
include Redmine::I18n
|
||||||
|
include ApplicationHelper
|
||||||
|
def self.homeworkscore_expose(field)
|
||||||
|
expose field do |f,opt|
|
||||||
|
if f.is_a?(Hash) && f.key?(field)
|
||||||
|
f[field]
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
homeworkscore_expose :name
|
||||||
|
homeworkscore_expose :score
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in new issue