From 73e4d2b25b26d6380da4814ba8217fb717099b89 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 11 Oct 2010 11:08:54 -0700 Subject: [PATCH] Pull in search improvement, remove cruft --- app/models/person.rb | 4 +--- spec/models/person_spec.rb | 1 - 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/app/models/person.rb b/app/models/person.rb index 1e358d11b..c2485d40d 100644 --- a/app/models/person.rb +++ b/app/models/person.rb @@ -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| diff --git a/spec/models/person_spec.rb b/spec/models/person_spec.rb index da535bfe3..b8738f934 100644 --- a/spec/models/person_spec.rb +++ b/spec/models/person_spec.rb @@ -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