scube-server/app/controllers/playlists_controller.rb
Thibault Jouan 33f979b573 Add basic playlists management
* Index of playlists
* Create a new playlist
* Basic playlist model with mandatory name
2011-07-12 00:32:06 +00:00

19 lines
321 B
Ruby

class PlaylistsController < ApplicationController
def index
@playlists = Playlist.all
end
def new
@playlist = Playlist.new
end
def create
@playlist = Playlist.new params[:playlist]
if @playlist.save
redirect_to :action => 'index'
else
render :action => 'new'
end
end
end