#369: fixed: undefined method id for nil:NilClass:

This commit is contained in:
Vokhmin Alexey V 2014-11-25 01:19:29 +03:00
parent b26f32b5c2
commit 55fad54108
2 changed files with 2 additions and 2 deletions

View File

@ -19,7 +19,7 @@ class Projects::IssuesController < Projects::BaseController
@all_issues = all_issues
@created_issues = all_issues.where(user_id: current_user)
@assigned_issues = all_issues.where(assignee_id: current_user.id)
@assigned_issues = all_issues.where(assignee_id: current_user)
case params[:filter]
when 'created'

View File

@ -5,7 +5,7 @@ json.sort_direction params[:direction]
json.status params[:status]
json.all_count @all_issues.not_closed_or_merged.count
json.assigned_count @assigned_issues.not_closed_or_merged.count
json.assigned_count (current_user ? @assigned_issues.not_closed_or_merged.count : 0)
json.created_count @created_issues.not_closed_or_merged.count
json.opened_count @opened_issues.count
json.closed_count @closed_issues.count