fixed search
This commit is contained in:
parent
905a982d35
commit
9037748d23
1 changed files with 1 additions and 1 deletions
|
|
@ -59,7 +59,7 @@ class Person < ActiveRecord::Base
|
|||
SQL
|
||||
end
|
||||
|
||||
q_tokens = query.to_s.strip.gsub(/(\s|$)/) { "%#{$1}" }
|
||||
q_tokens = query.to_s.strip.gsub(/(\s|$|^)/) { "%#{$1}" }
|
||||
[where_clause, [q_tokens, q_tokens]]
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue