19 lines
353 B
Ruby
19 lines
353 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class GsdsController < ApplicationController
|
||
|
def index
|
||
|
@gsds = Gsd.all
|
||
|
render json: @gsds.to_json
|
||
|
end
|
||
|
|
||
|
def show
|
||
|
@gsd = Gsd.find_by_id(params[:gsd_id])
|
||
|
render json: @gsd.to_json
|
||
|
end
|
||
|
|
||
|
def show_year
|
||
|
@gsds_for_year = Gsd.from_year(params[:year])
|
||
|
render json: @gsds_for_year.to_json
|
||
|
end
|
||
|
end
|