Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10933 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
e9018553e5
commit
2844e90902
|
@ -40,8 +40,8 @@ class SearchController < ApplicationController
|
|||
begin; offset = params[:offset].to_time if params[:offset]; rescue; end
|
||||
|
||||
# quick jump to an issue
|
||||
if @question.match(/^#?(\d+)$/) && Issue.visible.find_by_id($1.to_i)
|
||||
redirect_to :controller => "issues", :action => "show", :id => $1
|
||||
if (m = @question.match(/^#?(\d+)$/)) && (issue = Issue.visible.find_by_id(m[1].to_i))
|
||||
redirect_to issue_path(issue)
|
||||
return
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue