Add user to exercise_collection

This commit is contained in:
Maximilian Grundke
2017-12-10 18:35:49 +01:00
parent 00141830cc
commit 339a89107f
3 changed files with 11 additions and 1 deletions

View File

@ -1,6 +1,7 @@
class ExerciseCollection < ActiveRecord::Base
has_and_belongs_to_many :exercises
belongs_to :user, polymorphic: true
def to_s
"#{I18n.t('activerecord.models.exercise_collection.one')}: #{name} (#{id})"