diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-03 21:52:32 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2012-12-03 21:52:32 +0000 |
commit | 2844e9090238fb24a28a89506aab24d8f381e4f3 (patch) | |
tree | 667a4bf424c54bcaf90bbe97f8ee37cd788c5438 | |
parent | e9018553e509922c0eb8a5abfaf1e140506a3d6d (diff) | |
download | redmine-2844e9090238fb24a28a89506aab24d8f381e4f3.tar.gz redmine-2844e9090238fb24a28a89506aab24d8f381e4f3.zip |
Code cleanup.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@10933 e93f8b46-1217-0410-a6f0-8f06a7374b81
-rw-r--r-- | app/controllers/search_controller.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/controllers/search_controller.rb b/app/controllers/search_controller.rb index 7d4ac5599..96366fc02 100644 --- a/app/controllers/search_controller.rb +++ b/app/controllers/search_controller.rb @@ -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 |