diff options
author | Timothy Andrew <mail@timothyandrew.net> | 2016-09-08 12:33:38 +0300 |
---|---|---|
committer | Timothy Andrew <mail@timothyandrew.net> | 2016-09-08 12:33:38 +0300 |
commit | 9901c3df41d37e5d5650e28a5287a8ddf0aa754e (patch) | |
tree | 0f10ce6cfa414a45aeb3d260eb4f70b44cbe2774 /app/controllers/projects/cycle_analytics_controller.rb | |
parent | f5b9837c19f48255237eca1e618fc632a45b58b5 (diff) |
Add a JSON version of the `CycleAnalytics` page.
Diffstat (limited to 'app/controllers/projects/cycle_analytics_controller.rb')
-rw-r--r-- | app/controllers/projects/cycle_analytics_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/projects/cycle_analytics_controller.rb b/app/controllers/projects/cycle_analytics_controller.rb index 68cc79fb166..9903fae6f7d 100644 --- a/app/controllers/projects/cycle_analytics_controller.rb +++ b/app/controllers/projects/cycle_analytics_controller.rb @@ -3,6 +3,11 @@ class Projects::CycleAnalyticsController < Projects::ApplicationController def show @cycle_analytics = CycleAnalytics.new(@project, from: parse_start_date) + + respond_to do |format| + format.html + format.json { render json: @cycle_analytics } + end end private |