Sort exercise collection items by position

This commit is contained in:
Maximilian Grundke
2018-07-03 15:32:37 +02:00
parent b68b3bc2b0
commit 089bf578d3
2 changed files with 5 additions and 1 deletions

View File

@ -2,6 +2,7 @@ class ExerciseCollection < ActiveRecord::Base
include TimeHelper
has_many :exercise_collection_items
alias_method :items, :exercise_collection_items
has_many :exercises, through: :exercise_collection_items
belongs_to :user, polymorphic: true