parent
74301c52b1
commit
636f0655a3
@ -0,0 +1,5 @@
|
|||||||
|
class ExerciseUserScore < ApplicationRecord
|
||||||
|
belongs_to :exercise
|
||||||
|
belongs_to :exercise_user
|
||||||
|
belongs_to :user
|
||||||
|
end
|
@ -0,0 +1,13 @@
|
|||||||
|
class CreateExerciseUserScores < ActiveRecord::Migration[5.2]
|
||||||
|
def change
|
||||||
|
create_table :exercise_user_scores do |t|
|
||||||
|
t.references :exercise, index: true
|
||||||
|
t.references :exercise_user, index: true
|
||||||
|
t.float :score
|
||||||
|
t.text :comment
|
||||||
|
t.references :user, index: true
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
@ -0,0 +1,5 @@
|
|||||||
|
require 'rails_helper'
|
||||||
|
|
||||||
|
RSpec.describe ExerciseUserScore, type: :model do
|
||||||
|
pending "add some examples to (or delete) #{__FILE__}"
|
||||||
|
end
|
Loading…
Reference in new issue