fix multiple renders

This commit is contained in:
Alexander Machehin 2014-09-10 14:53:39 +06:00
parent e42214680a
commit e5788a09c8
1 changed files with 5 additions and 2 deletions

View File

@ -32,9 +32,12 @@ class Api::V1::IssuesController < Api::V1::BaseController
end
def show
redirect_to api_v1_project_pull_request_path(@project.id, @issue.serial_id) if @issue.pull_request
if @issue.pull_request
redirect_to api_v1_project_pull_request_path(@project.id, @issue.serial_id)
else
respond_to :json
end
end
def create
@issue.user = current_user