parent
f12a20f85e
commit
3fae37fa90
@ -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