This commit is contained in:
MrZYX 2011-03-19 14:46:04 +01:00
parent 6fe4b5bc56
commit dce54f3d40
2 changed files with 3 additions and 3 deletions

View file

@ -12,8 +12,8 @@ class PeopleController < ApplicationController
@aspect = :search @aspect = :search
params[:q] ||= params[:term] params[:q] ||= params[:term]
if params[:q][0] == 35 || params[:q][0] == '#' if (params[:q][0] == 35 || params[:q][0] == '#') && params[:q].length > 1
redirect_to "/p/?tag=#{params[:q].gsub("#", "")}" redirect_to "/tags/#{params[:q].gsub("#", "")}"
return return
end end

View file

@ -53,7 +53,7 @@ describe PeopleController do
it 'goes to a tag page if you search for a hash' do it 'goes to a tag page if you search for a hash' do
get :index, :q => '#babies' get :index, :q => '#babies'
response.should redirect_to('/p/?tag=babies') response.should redirect_to('/tags/babies')
end end
end end