summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 %>