diff options
| author | mo khan <mo@mokhan.ca> | 2017-02-18 11:49:10 -0700 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2017-02-18 11:49:10 -0700 |
| commit | 2fae577b43f930a456bc0ce93e36f3f18eece601 (patch) | |
| tree | c0a78293abed4558c9c6d784795f9eed0fdcecbf /app/models | |
| parent | 3ea15efd43893620c8c37aafe47d3f134c0182a8 (diff) | |
use chart.js instead of google charts.
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/workout.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/workout.rb b/app/models/workout.rb index 2cfa315..6770675 100644 --- a/app/models/workout.rb +++ b/app/models/workout.rb @@ -15,7 +15,7 @@ class Workout < ApplicationRecord joins(:exercises).where(exercises: { id: exercise.id }).distinct end scope :to_line_chart, -> do - joins(:exercise_sets).group(:occurred_at).recent.maximum(:target_weight) + joins(:exercise_sets).group(:occurred_at).recent.maximum('exercise_sets.target_weight') end def train(exercise, target_weight, repetitions:, set: nil) |
