newyslclassrooms
cxt 5 years ago
parent 4d03f190cb
commit ec1fd2519e

@ -8,7 +8,8 @@ class CourseVideosController < ApplicationController
def create def create
title = params[:name].strip title = params[:name].strip
link = params[:link].strip link = params[:link].strip
@course.course_videos.create!(title: title, link: link, is_link: 1, user_id: current_user.id) course_second_category_id = params[:category_id] || 0
@course.course_videos.create!(title: title, link: link, is_link: 1, user_id: current_user.id, course_second_category_id: course_second_category_id)
render_ok render_ok
end end

@ -1,4 +1,4 @@
json.partial! "commons/success" # json.partial! "commons/success"
json.data do json.data do
json.id @category_id json.id @category_id
json.name @category_name json.name @category_name

@ -1,4 +1,4 @@
json.(attendance, :name, :mode) json.(attendance, :id, :name, :mode)
json.attendance_date attendance.attendance_date.strftime("%Y/%m/%d") json.attendance_date attendance.attendance_date.strftime("%Y/%m/%d")
json.start_time attendance.start_time.strftime("%H:%M") json.start_time attendance.start_time.strftime("%H:%M")
json.end_time attendance.end_time.strftime("%H:%M") json.end_time attendance.end_time.strftime("%H:%M")

Loading…
Cancel
Save