diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index e645ecb14..a23c69735 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -24,7 +24,7 @@ class PeopleController < ApplicationController return elsif (params[:q][0] == 35 || params[:q][0] == '#') && params[:q].length == 1 flash[:error] = I18n.t('tags.show.none', :name => params[:q]) - redirect_to multi_path() + redirect_to :back end limit = params[:limit] ? params[:limit].to_i : 15 diff --git a/spec/controllers/people_controller_spec.rb b/spec/controllers/people_controller_spec.rb index 62305276a..fb9db299d 100644 --- a/spec/controllers/people_controller_spec.rb +++ b/spec/controllers/people_controller_spec.rb @@ -91,6 +91,10 @@ describe PeopleController do get :index, :q => '#babi.es' response.should redirect_to(tag_path('babies', :q => '#babi.es')) end + + it 'stay on the page if you search for the empty hash' do + get :index, :q => '#' + response.should redirect_to(:back) end describe '#tag_index' do