commit helper refactoring
This commit is contained in:
parent
5d6e79f4b9
commit
49b5805709
|
@ -30,8 +30,7 @@ module CommitsHelper
|
||||||
message.split(/(#[0-9]+)/m).each do |m|
|
message.split(/(#[0-9]+)/m).each do |m|
|
||||||
if m =~ /(#([0-9]+))/m
|
if m =~ /(#([0-9]+))/m
|
||||||
begin
|
begin
|
||||||
issue = Issue.find($2)
|
issue = project.issues.find($2)
|
||||||
raise Exception('Issue not belonging to current project, not creating link !') unless issue.project_id == project.id
|
|
||||||
out += link_to($1, project_issue_path(project, $2))
|
out += link_to($1, project_issue_path(project, $2))
|
||||||
rescue
|
rescue
|
||||||
out += $1
|
out += $1
|
||||||
|
|
Loading…
Reference in a new issue