socialforge/app/api/mobile/entities/course_group.rb

20 lines
418 B
Ruby
Raw Normal View History

2016-09-20 14:58:37 +08:00
module Mobile
module Entities
class CourseGroup < Grape::Entity
include Redmine::I18n
include ApplicationHelper
include ApiHelper
def self.course_group_expose(f)
expose f do |u,opt|
if u.is_a?(Hash) && u.key?(f)
u[f]
end
end
end
expose :id
expose :name
expose :users, using: Mobile::Entities::User
end
end
end