You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

13 lines
317 B

class StatisticsController < ApplicationController
TODAY = Date.today
def show
service = params.fetch :id
respond_to do |format|
format.json do
json = Stat.where(name: "grades_for_#{service}").order(date: :desc).first.data
render json: json, status: :ok
end
end
end
end