MS put some current users checks into a single one

This commit is contained in:
maxwell 2010-08-09 21:30:56 -07:00
parent 4e062c143b
commit d7d9c8aac5

View file

@ -16,10 +16,12 @@ class ApplicationController < ActionController::Base
end
def set_friends_and_status
@groups = current_user.groups
@friends = current_user.friends if current_user
@latest_status_message = StatusMessage.newest_for(current_user) if current_user
@group = params[:group] ? Group.first(:id => params[:group]) : Group.first
if current_user
@groups = current_user.groups
@friends = current_user.friends
@latest_status_message = StatusMessage.newest_for(current_user)
@group = params[:group] ? Group.first(:id => params[:group]) : Group.first
end
end
def count_requests