Pull in search improvement, remove cruft
This commit is contained in:
parent
fe360e386a
commit
73e4d2b25b
2 changed files with 1 additions and 4 deletions
|
|
@ -36,10 +36,8 @@ class Person
|
|||
def self.search(query)
|
||||
qTokens = query.to_s.strip.split(" ")
|
||||
fullQueryText = Regexp.escape( query.to_s.strip )
|
||||
p = []
|
||||
|
||||
p = Person.all('profile.first_name' => /^#{fullQueryText}/i) \
|
||||
| Person.all('profile.last_name' => /^#{fullQueryText}/i)
|
||||
|
||||
qTokens.each {
|
||||
|token|
|
||||
|
||||
|
|
|
|||
|
|
@ -160,7 +160,6 @@ describe Person do
|
|||
end
|
||||
|
||||
it 'should yield results on full names' do
|
||||
pending "Not yet implemented."
|
||||
people = Person.search("Casey Grippi")
|
||||
people.should == [@friend_four]
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue