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_dynamic.rb

16 lines
450 B

module Mobile
module Entities
class CourseDynamic < Grape::Entity
def self.course_dynamic_expose(field)
expose field do |c,opt|
c[field] if (c.is_a?(Hash) && c.key?(field))
end
end
course_dynamic_expose :type
course_dynamic_expose :count
course_dynamic_expose :course_name
course_dynamic_expose :course_id
course_dynamic_expose :course_img_url
end
end
end