Refactor controllers
This commit is contained in:
@@ -1,10 +1,18 @@
|
||||
module API
|
||||
class TracksController < ApplicationController
|
||||
before_action :set_track, only: :show
|
||||
|
||||
def index
|
||||
@tracks = Track.all
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
|
||||
private
|
||||
|
||||
def set_track
|
||||
@track = Track.find(params[:id])
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user