Keep searched tag in the search field. Closes #1983.
This commit is contained in:
parent
f0b219f474
commit
6849c3604b
2 changed files with 6 additions and 1 deletions
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Reference in a new issue