mirror of
https://github.com/openSUSE/osem.git
synced 2026-04-27 10:23:02 -04:00
14 lines
313 B
Ruby
14 lines
313 B
Ruby
class Api::V1::TracksController < Api::BaseController
|
|
respond_to :json
|
|
|
|
def index
|
|
if params[:conference_id].blank?
|
|
tracks = Track.all
|
|
else
|
|
tracks = Track.joins(:conference)
|
|
tracks = tracks.where("conferences.guid" => params[:conference_id])
|
|
end
|
|
respond_with tracks
|
|
end
|
|
end
|