diff --git a/app/controllers/people_controller.rb b/app/controllers/people_controller.rb index 82aea9b8c..28daa5bba 100644 --- a/app/controllers/people_controller.rb +++ b/app/controllers/people_controller.rb @@ -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 tag_path(:name => params[:q].gsub(/[#\.]/, '')) + redirect_to tag_path(:name => params[:q].gsub(/[#\.]/, ''), :q => params[:q]) return end diff --git a/features/tags.feature b/features/tags.feature index b2470b57b..06cfc8dcc 100644 --- a/features/tags.feature +++ b/features/tags.feature @@ -11,6 +11,11 @@ Feature: Interacting with tags Then I should be on the tag page for "rockstar" And I should see "Samuel Beckett" + Scenario: Searching for a tag keeps the search term in the search field + When I search for "#rockstar" + Then I should be on the tag page for "rockstar" + And the "q" field within "#global_search" should contain "#rockstar" + @wip Scenario: adding a contact from a tag page When I search for "#rockstar"