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

commit helper refactoring

parent 5d6e79f4
......@@ -30,8 +30,7 @@ module CommitsHelper
message.split(/(#[0-9]+)/m).each do |m|
if m =~ /(#([0-9]+))/m
begin
issue = Issue.find($2)
raise Exception('Issue not belonging to current project, not creating link !') unless issue.project_id == project.id
issue = project.issues.find($2)
out += link_to($1, project_issue_path(project, $2))
rescue
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