fix 视频标题

courseware
anke1460 5 years ago
parent 27a3775bc2
commit fb70c4bd21

@ -1520,7 +1520,7 @@ class CoursesController < ApplicationController
end
end
@videos = @videos.select("course_videos.id, videos.user_id, videos.title, IFNULL(hisotries.time,0) AS total_time, IFNULL(hisotries.num,0) AS people_num")
@videos = @videos.select("course_videos.id, videos.user_id, videos.title AS video_title, IFNULL(hisotries.time,0) AS total_time, IFNULL(hisotries.num,0) AS people_num")
@videos = paginate @videos
end

@ -1,7 +1,7 @@
json.videos do
json.array! @videos do |v|
json.id v.id
json.title v.title
json.title v['video_title']
json.user_name v.user&.real_name
json.people_num v['people_num']
json.total_time v['total_time'].round(0)

Loading…
Cancel
Save