Skip to content
Extraits de code Groupes Projets
Valider dce54f3d rédigé par MrZYX's avatar MrZYX
Parcourir les fichiers

fixed #947

parent 6fe4b5bc
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
...@@ -12,8 +12,8 @@ class PeopleController < ApplicationController ...@@ -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
......
...@@ -53,7 +53,7 @@ describe PeopleController do ...@@ -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
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter