You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
trustieforge/app/api/mobile/entities/course_group.rb

20 lines
418 B

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