Add database support and model for tips

This commit is contained in:
Sebastian Serth
2020-10-07 17:42:44 +02:00
parent 85a05225ec
commit 2e1c97d87d
7 changed files with 101 additions and 1 deletions

View File

@ -24,6 +24,8 @@ class Exercise < ApplicationRecord
has_many :tags, through: :exercise_tags
accepts_nested_attributes_for :exercise_tags
has_many :user_exercise_feedbacks
has_many :exercise_tips
has_many :tips, through: :exercise_tips
has_many :external_users, source: :user, source_type: 'ExternalUser', through: :submissions
has_many :internal_users, source: :user, source_type: 'InternalUser', through: :submissions