Fix creating exercise collections with exercises
This commit is contained in:
@@ -15,7 +15,7 @@ class Exercise < ActiveRecord::Base
|
||||
has_and_belongs_to_many :proxy_exercises
|
||||
has_many :user_proxy_exercise_exercises
|
||||
has_many :exercise_collection_items
|
||||
has_many :exercise_collections, through: :exercise_collection_items
|
||||
has_many :exercise_collections, through: :exercise_collection_items, inverse_of: :exercises
|
||||
has_many :user_exercise_interventions
|
||||
has_many :interventions, through: :user_exercise_interventions
|
||||
has_many :exercise_tags
|
||||
|
@@ -3,7 +3,7 @@ class ExerciseCollection < ActiveRecord::Base
|
||||
|
||||
has_many :exercise_collection_items
|
||||
alias_method :items, :exercise_collection_items
|
||||
has_many :exercises, through: :exercise_collection_items
|
||||
has_many :exercises, through: :exercise_collection_items, inverse_of: :exercise_collections
|
||||
belongs_to :user, polymorphic: true
|
||||
|
||||
def collection_statistics
|
||||
|
Reference in New Issue
Block a user