person searchable by diaspora_handle
This commit is contained in:
parent
8c89f8d87a
commit
e9f3efea79
2 changed files with 5 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ class Person
|
|||
q = Regexp.escape(token.to_s.strip)
|
||||
p = Person.searchable.all('profile.first_name' => /^#{q}/i) \
|
||||
| Person.searchable.all('profile.last_name' => /^#{q}/i) \
|
||||
| Person.searchable.all('diaspora_handle' => /^#{q}/i) \
|
||||
| p
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -193,6 +193,10 @@ describe Person do
|
|||
Person.search("johnson").should_not include invisible_person
|
||||
Person.search("").should_not include invisible_person
|
||||
end
|
||||
|
||||
it 'should search on handles' do
|
||||
Person.search(@friend_one.diaspora_handle).should include @friend_one
|
||||
end
|
||||
end
|
||||
|
||||
context 'people finders for webfinger' do
|
||||
|
|
|
|||
Loading…
Reference in a new issue