parent
d71c181d12
commit
8914a41ac6
@ -0,0 +1,4 @@
|
|||||||
|
class CourseVideo < ApplicationRecord
|
||||||
|
belongs_to :course
|
||||||
|
belongs_to :video
|
||||||
|
end
|
@ -0,0 +1,2 @@
|
|||||||
|
json.count @count
|
||||||
|
json.videos @videos, partial: 'users/videos/video', as: :video
|
@ -0,0 +1,9 @@
|
|||||||
|
class CreateCourseVideos < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
create_table :course_videos do |t|
|
||||||
|
t.references :course
|
||||||
|
t.references :video
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe CourseVideo, type: :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
Loading…
Reference in new issue