Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9fde92

Browse files
committed
Comment out rough draft API: GET /stats.json
This is totally NOT rushed. Need to be reconsidered before using this API from other websites/products.
1 parent c90d663 commit e9fde92

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

app/controllers/stats_controller.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,4 @@
11
class StatsController < ApplicationController
2-
# GET /stats.json
3-
def api
4-
# NOTE: Prototype. Need to do refactoring.
5-
@stats_data = [
6-
active_dojos: Dojo.active_dojos_count,
7-
]
8-
9-
render json: @stats_data
10-
end
112

123
# GET /stats[.json]
134
def show
@@ -111,3 +102,12 @@ def show
111102
# %td= num
112103
# /%td= @participants.values.sum
113104

105+
# NOTE: Rough draft. Need to be reconsidered.
106+
# GET /stats.json
107+
#def api
108+
# @stats_data = [
109+
# active_dojos: Dojo.active_dojos_count,
110+
# ]
111+
#
112+
# render json: @stats_data
113+
#end

config/routes.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,6 @@
5757

5858
get "/podcast", to: redirect('/podcasts')
5959
get "/podcasts/feed" => "podcasts#feed"
60-
get '/stats.json' => "stats#api"
6160
get "/stats" => "stats#show"
6261
get "/pokemon" => "pokemons#new"
6362
post "/pokemon" => "pokemons#create"

0 commit comments

Comments
 (0)