*** *** ** ** ** ** * * * * * * * ** ** ** ** ** ** * ____ _ _ ____ _ _ | _ \ __ _(_) |___ / ___(_)_ __| |___ | |_) / _` | | / __| | | _| | '__| / __| | _ < (_| | | \__ \ | |_| | | | | \__ \ |_| \_\__,_|_|_|___/ \____|_|_| |_|___/
In this app, users can sign up to create a playlist by uploading mp3 files. Any visitor to the site can view all of the playlists, browse around, and listen to music.
-
rails g controller playlists
-
add playlist routes
-
see routes with rake routes
-
go to /playslists
-
set root url to playslists index
-
add link to ‘Home’ in layout
-
rails g devise:install
-
rails g devise User
-
look at new User model; remove ‘recoverable’ module – don’t want to setup email
-
look at the create_users migration; comment out ‘recoverable’ columns and index on reset_password_token
-
add a string column for ‘username’ and add a unique index for this column
-
rake db:migrate
-
rails g model playlist
-
in Playlist mode: belongs to user
-
in create_playlists migration: belongs to user
-
render playlist partial in index
-
create playlist in rails console
-
reload index page
-
register a new user: add a signup link to the layout
-
add username field to signup form
-
add username to attr_accesible in User
-
user has one playlist
-
create playlist on user create
-
show playlist username in playlist partial
-
complete signup
-
view playlist index
-
create show action
-
link to playlist from username in index
-
rails g model song
-
in song model: has attached file
-
in playlist model: has many songs
-
show username of playlist on playlist page
-
if playlist has songs, render partial
-
write song migration
-
rake db:migrate
-
create songs controller
-
song is resource of playlist
-
define create action: before filter to find playlist
-
on playlist show page: if user is playlist owner, render upload form
-
add file to accessible attrs
-
upload an mp3
-
complete song partial
-
show number of songs
-
include RankedModel in songs
-
ranks row_order with name playlist_id
-
add row_order_position to accessible attrs
-
rails g migration add_row_order_to_songs
-
rake db:migrate
-
add update action to songs; find song before filter
-
add sortable class to songs table
-
show drag control if user is playlist owner
-
add data-update-url to song table row
-
update playlist show page to rank songs
-
update application layout
-
define destroy action: redirect to playlist show after destroy
-
add to find_song before_filter
-
show flash messages
-
add # songs to playlists index
-
link to user’s playlist in dropdown
-
touch playlist when songs saved for ‘last modified’ display
-
validate playlist has user
-
validate song has playlist
-
validate song has attached file
-
at to_param and from_param to playlist
-
find playlist by param in playlists and songs controller
-
add contraint to routes
-
store song files on S3 in production
-
rename title of song
-
allow only mp3s to be uploaded
-
use id3 tags from mp3s
-
upload progress
-
Javascript to automatically start next song/prevent two songs from playing at once
-
order playlists by last update
-
paginate playlists