Keep searched tag in the search field. Closes #1983.

This commit is contained in:
Gonzalo Rodriguez 2011-10-12 04:09:24 -02:00
parent f0b219f474
commit 6849c3604b
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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"