scube-server/app/controllers/api/playlists_controller.rb
Thibault Jouan 1efb3103d9 Remove respond_to usage in playlists controller
This feature was deprecated by rails.
2015-04-29 11:17:29 +00:00

19 lines
328 B
Ruby

module API
class PlaylistsController < ApplicationController
def index
@playlists = Playlist.all
end
def create
@playlist = current_user.playlists.build(playlist_params)
@playlist.save
end
private
def playlist_params
params.require(:playlist).permit(:name)
end
end
end