MS put some current users checks into a single one
This commit is contained in:
parent
4e062c143b
commit
d7d9c8aac5
1 changed files with 6 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue