Return everyone on an empty search
This commit is contained in:
parent
6f2f9afe56
commit
fe0120cc0d
1 changed files with 1 additions and 0 deletions
|
|
@ -34,6 +34,7 @@ class Person
|
||||||
/^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix
|
/^(https?):\/\/[a-z0-9]+([\-\.]{1}[a-z0-9]+)*(\.[a-z]{2,5})?(:[0-9]{1,5})?(\/.*)?$/ix
|
||||||
|
|
||||||
def self.search(query)
|
def self.search(query)
|
||||||
|
return Person.all if query.to_s.empty?
|
||||||
qTokens = query.to_s.strip.split(" ")
|
qTokens = query.to_s.strip.split(" ")
|
||||||
fullQueryText = Regexp.escape( query.to_s.strip )
|
fullQueryText = Regexp.escape( query.to_s.strip )
|
||||||
p = []
|
p = []
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue