[#42] fix default assigneed issues list

This commit is contained in:
Alexander Machehin 2013-04-16 01:22:07 +06:00
parent f6bb05b513
commit 6c2f13a625
1 changed files with 5 additions and 2 deletions

View File

@ -55,8 +55,11 @@ class Api::V1::IssuesController < Api::V1::BaseController
def render_issues_list
@issues = @issues.includes(:user, :assignee, :labels).without_pull_requests
@issues = @issues.opened if params[:status] == 'open'
@issues = @issues.closed if params[:status] == 'closed'
if params[:status] == 'closed'
@issues = @issues.closed
else
@issues = @issues.opened
end
if action_name == 'index' && params[:assignee].present?
case params[:assignee]