Use named helper instead of hardcoded route

This commit is contained in:
Gonzalo Rodriguez 2011-09-02 22:49:16 -03:00
parent 3129aeb133
commit eae9c14168

View file

@ -18,7 +18,7 @@ class PeopleController < ApplicationController
params[:q] ||= params[:term] || ''
if (params[:q][0] == 35 || params[:q][0] == '#') && params[:q].length > 1
redirect_to "/tags/#{params[:q].gsub("#", "")}"
redirect_to tag_path(:name => params[:q].gsub("#", ""))
return
end