15 lines
250 B
Ruby
15 lines
250 B
Ruby
|
class CvesController < ApplicationController
|
||
|
def index
|
||
|
@cves = Cve.all
|
||
|
end
|
||
|
|
||
|
def show
|
||
|
@cve = Cve.find_by_id(params[:cve_id])
|
||
|
render json: @cve.to_json
|
||
|
end
|
||
|
|
||
|
def show_year
|
||
|
@cves_for_year = Cve.for_year(params[:year])
|
||
|
end
|
||
|
end
|