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.
educoder/app/views/courses/course_videos.json.jbuilder

22 lines
558 B

json.count @count
json.videos @videos do |video|
if video.is_link
json.(video, :id, :title, :link, :user_id)
user = video.user
json.user_name user&.real_name
json.user_img url_to_avatar(user)
json.user_login user&.login
else
json.partial! 'users/videos/video', locals: { video: video.video }
end
end
json.course_id @course.id
if @category.present?
json.category_id @category.id
json.category_name @category.name
end
json.course_module_id @video_module&.id
json.has_category @video_module.course_second_categories.size > 0