Commit 49b58057091cbe6d9d684d78b1efbc77c578bcd8

Authored by Valery Sizov
1 parent 5d6e79f4

commit helper refactoring

Showing 1 changed file with 1 additions and 2 deletions   Show diff stats
app/helpers/commits_helper.rb
... ... @@ -30,8 +30,7 @@ module CommitsHelper
30 30 message.split(/(#[0-9]+)/m).each do |m|
31 31 if m =~ /(#([0-9]+))/m
32 32 begin
33   - issue = Issue.find($2)
34   - raise Exception('Issue not belonging to current project, not creating link !') unless issue.project_id == project.id
  33 + issue = project.issues.find($2)
35 34 out += link_to($1, project_issue_path(project, $2))
36 35 rescue
37 36 out += $1
... ...