-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2d16370
commit 20a3f38
Showing
16 changed files
with
81 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,8 @@ gem 'sqlite3' | |
|
||
gem 'soundcloud' | ||
|
||
|
||
|
||
gem 'devise' | ||
# Use SCSS for stylesheets | ||
gem 'sass-rails', '~> 4.0.3' | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
$(document).ready(function(){ | ||
|
||
$('.add-song').on('click',function(e){ | ||
console.log($(this).closest('div[class="track"]')); | ||
}); | ||
|
||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the song controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
class SongController < ApplicationController | ||
def index | ||
end | ||
|
||
def create | ||
|
||
end | ||
|
||
def destroy | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module SongHelper | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
class Song < ActiveRecord::Base | ||
belongs_to :user | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
<h3><em><%=track.title %></em><h3> | ||
<ul> | ||
<li><img src="<%=track.artwork_url%>"/></li> | ||
<li><%=track.uri%></li> | ||
<li> <object height="81" width="100%" class="myPlayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> | ||
<param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fmatas%2Fhobnotropic&enable_api=true&object_id=yourPlayerId"></param> | ||
<param name="allowscriptaccess" value="always"></param> | ||
<param name='show_comments' value='false'></param> | ||
<embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=<%=track.uri%>&enable_api=true&object_id=yourPlayerId&show_comments=false" type="application/x-shockwave-flash" width="100%" name="yourPlayerId"></embed> | ||
</object></li> | ||
</ul> | ||
<div class='track'> | ||
<h3 class='title'><em><%=track.title %></em><h3> | ||
<ul> | ||
<li><img class='artwork' src="<%=track.artwork_url%>"/></li> | ||
<li class='track_url'><%=track.uri%></li> | ||
<li> <object height="81" width="100" class="myPlayer" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"> | ||
<param name="movie" value="http://player.soundcloud.com/player.swf?url=http%3A%2F%2Fsoundcloud.com%2Fmatas%2Fhobnotropic&enable_api=true&object_id=yourPlayerId"></param> | ||
<param name="allowscriptaccess" value="always"></param> | ||
<param name='show_comments' value='false'></param> | ||
<embed allowscriptaccess="always" height="81" src="http://player.soundcloud.com/player.swf?url=<%=track.uri%>&enable_api=true&object_id=yourPlayerId&show_comments=false" type="application/x-shockwave-flash" width="100%" name="yourPlayerId"></embed> | ||
</object></li> | ||
<li><button type='button' class='btn btn-default add-song' href='songs_path'/>Add to Playlist</button></li> | ||
</ul> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Song#create</h1> | ||
<p>Find me in app/views/song/create.html.erb</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Song#destroy</h1> | ||
<p>Find me in app/views/song/destroy.html.erb</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
<h1>Song#index</h1> | ||
<p>Find me in app/views/song/index.html.erb</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,14 @@ | ||
Rails.application.routes.draw do | ||
get 'song/index' | ||
|
||
get 'song/create' | ||
|
||
get 'song/destroy' | ||
|
||
devise_for :users | ||
root 'home#index' | ||
|
||
resources :songs, only: [:index, :create, :destroy] | ||
|
||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class Songs < ActiveRecord::Migration | ||
def change | ||
create_table :songs do |t| | ||
t.string :url_track, :url_image, :title | ||
t.belongs_to :user | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters