Remove last playlists and tracks from home

This commit is contained in:
Thibault Jouan
2015-05-01 11:03:34 +00:00
parent 4b0f4d391f
commit b25fbaac5e
8 changed files with 15 additions and 89 deletions

View File

@@ -3,6 +3,8 @@ class ApplicationController < ActionController::Base
before_filter :authenticate!
helper_method :current_user?
def current_user= user
session[:user_id] = user.id
end
@@ -11,6 +13,10 @@ class ApplicationController < ActionController::Base
@current_user ||= User.find_by(id: session[:user_id]) if session[:user_id]
end
def current_user?
!!@current_user
end
protected

View File

@@ -1,6 +1,4 @@
class HomeController < ApplicationController
def index
@playlists = Playlist.all
@tracks = Track.latest
end
end