summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--app/controllers/search_controller.rb4
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