Implement tracks/{show,listen}

This commit is contained in:
Thibault Jouan
2011-07-13 18:34:41 +00:00
parent 3e7f4a7168
commit 34b38b77cf
12 changed files with 142 additions and 26 deletions

View File

@@ -0,0 +1,8 @@
class TracksController < ApplicationController
def show
@track = Track.find params[:id]
end
def stream
end
end

3
app/models/track.rb Normal file
View File

@@ -0,0 +1,3 @@
class Track < ActiveRecord::Base
validates_presence_of :name
end

View File

@@ -0,0 +1,3 @@
%h1= @track.name
%audio{:src => stream_track_path(@track)}
Your browser does not support the audio element