fixed #947
This commit is contained in:
parent
6fe4b5bc56
commit
dce54f3d40
2 changed files with 3 additions and 3 deletions
|
|
@ -12,8 +12,8 @@ class PeopleController < ApplicationController
|
|||
@aspect = :search
|
||||
params[:q] ||= params[:term]
|
||||
|
||||
if params[:q][0] == 35 || params[:q][0] == '#'
|
||||
redirect_to "/p/?tag=#{params[:q].gsub("#", "")}"
|
||||
if (params[:q][0] == 35 || params[:q][0] == '#') && params[:q].length > 1
|
||||
redirect_to "/tags/#{params[:q].gsub("#", "")}"
|
||||
return
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ describe PeopleController do
|
|||
|
||||
it 'goes to a tag page if you search for a hash' do
|
||||
get :index, :q => '#babies'
|
||||
response.should redirect_to('/p/?tag=babies')
|
||||
response.should redirect_to('/tags/babies')
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue