Class: ModelsTimeline::TracksController

Inherits:
ApplicationController show all
Defined in:
app/controllers/models_timeline/tracks_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



5
6
7
8
9
10
11
12
# File 'app/controllers/models_timeline/tracks_controller.rb', line 5

def index
  @tracks = Track.all

  respond_to do |format|
    format.html # index.html.erb
    format.json { render json: @tracks }
  end
end

#showObject



14
15
16
17
18
19
20
21
# File 'app/controllers/models_timeline/tracks_controller.rb', line 14

def show
  @track = Track.find(params[:id])

  respond_to do |format|
    format.html # show.html.erb
    format.json { render json: @track }
  end
end