summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2017-02-18 10:35:11 -0700
committermo khan <mo@mokhan.ca>2017-02-18 10:35:11 -0700
commit72dcfcd47cf3573feadbef4222b3eede95fb8a54 (patch)
treec88b368da51733c1475b571ed05eded316a2cd29 /app
parentb863966fa51587cd9b69cc145f754c691dc41c5b (diff)
fix chart templates.
Diffstat (limited to 'app')
-rw-r--r--app/controllers/charts_controller.rb2
-rw-r--r--app/views/charts/index.js.erb (renamed from app/views/graphs/show.js.erb)0
-rw-r--r--app/views/workouts/index.html.erb2
3 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/charts_controller.rb b/app/controllers/charts_controller.rb
index 39cd6a3..9475a0c 100644
--- a/app/controllers/charts_controller.rb
+++ b/app/controllers/charts_controller.rb
@@ -2,7 +2,7 @@ class ChartsController < ApplicationController
def index
exercise = Exercise.find_by(id: params[:exercise])
respond_to do |format|
- format.html { @training_history = current_user.history_for(exercise) }
+ format.js { @training_history = current_user.history_for(exercise) }
format.json { render json: recent_workouts(exercise).to_line_chart }
end
end
diff --git a/app/views/graphs/show.js.erb b/app/views/charts/index.js.erb
index 65c769e..65c769e 100644
--- a/app/views/graphs/show.js.erb
+++ b/app/views/charts/index.js.erb
diff --git a/app/views/workouts/index.html.erb b/app/views/workouts/index.html.erb
index 7c8aa68..f6cf399 100644
--- a/app/views/workouts/index.html.erb
+++ b/app/views/workouts/index.html.erb
@@ -52,7 +52,7 @@
<% if @exercise %>
<div class="columns">
<div class="column is-12">
- <%= line_chart charts_path(filter_params_hash(exercise: @exercise.to_param)) %>
+ <%= line_chart charts_path(filter_params_hash) %>
</div>
</div>
<% end %>