prevent searching with spaces
This commit is contained in:
parent
72785a69cb
commit
254c411bd9
1 changed files with 1 additions and 1 deletions
|
|
@ -38,7 +38,7 @@ class Person < ActiveRecord::Base
|
|||
scope :searchable, joins(:profile).where(:profiles => {:searchable => true})
|
||||
|
||||
def self.search(query)
|
||||
return [] if query.to_s.empty?
|
||||
return [] if query.to_s.blank?
|
||||
|
||||
where_clause = <<-SQL
|
||||
profiles.first_name LIKE ? OR
|
||||
|
|
|
|||
Loading…
Reference in a new issue