Commit 49b58057 authored by Valery Sizov's avatar Valery Sizov

commit helper refactoring

parent 5d6e79f4
...@@ -30,8 +30,7 @@ module CommitsHelper ...@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment