Fix coding standards in application files

This commit is contained in:
Thibault Jouan
2015-04-30 08:52:00 +00:00
parent 737ac1f10a
commit 3b733c349e
16 changed files with 34 additions and 26 deletions

View File

@@ -8,7 +8,8 @@ class PlaylistsController < ApplicationController
end
def create
@playlist = current_user.playlists.build(playlist_params)
@playlist = current_user.playlists.build playlist_params
if @playlist.save
redirect_to action: 'index'
else
@@ -22,6 +23,7 @@ class PlaylistsController < ApplicationController
def update
@playlist = Playlist.find(params[:id])
if @playlist.update_attributes playlist_params
redirect_to action: 'index'
else
@@ -29,9 +31,10 @@ class PlaylistsController < ApplicationController
end
end
private
def playlist_params
params.require(:playlist).permit(:name)
params.require(:playlist).permit :name
end
end