[#19] fix error with pull request

This commit is contained in:
Alexander Machehin 2013-04-11 15:40:18 +06:00
parent 9c2f5eb8e9
commit ee289a9798
1 changed files with 2 additions and 2 deletions

View File

@ -170,8 +170,8 @@ module Modules
def reference_issue(identifier)
if issue = Issue.find_by_hash_tag(identifier, current_ability, @project)
if issue.pull_request
title = "#{PullRequest.model_name.human}: #{pull_request.title}"
project_pull_request_path(pull_request.to_project, pull_request)
title = "#{PullRequest.model_name.human}: #{issue.title}"
url = project_pull_request_path(issue.project, issue.pull_request)
else
title = "#{Issue.model_name.human}: #{issue.title}"
url = project_issue_path(issue.project.owner, issue.project.name, issue.serial_id)