mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 20:00:49 +08:00
init project
This commit is contained in:
8
app/views/weapps/courses/basic_info.json.jbuilder
Normal file
8
app/views/weapps/courses/basic_info.json.jbuilder
Normal file
@@ -0,0 +1,8 @@
|
||||
json.course do
|
||||
json.(@course, :id, :name)
|
||||
json.code_halt @course.invite_code_halt == 1
|
||||
json.invite_code @course.invite_code_halt == 0 ? @course.generate_invite_code : ""
|
||||
json.teacher_name @course.teacher.real_name
|
||||
json.teacher_img url_to_avatar(@course.teacher)
|
||||
json.teacher_school @course.school.try(:name)
|
||||
end
|
||||
Reference in New Issue
Block a user