Permalink
Browse files

corrigindo busca de pessoas com upper case

  • Loading branch information...
luizfaias committed Aug 10, 2011
1 parent f0ffcbe commit 22df30309c6324c849665f6dbb0398fabaf17e6e
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/person.rb
View
@@ -11,7 +11,7 @@ def status_description
def self.search(query, page = 1)
if query
- Person.where('name LIKE upper(:query) or birth_date LIKE upper(:query)', :query => "%#{query}%").paginate :page => page, :per_page => 50
+ Person.where('upper(name) LIKE upper(:query) or birth_date LIKE upper(:query)', :query => "%#{query}%").paginate :page => page, :per_page => 50
else
Person.paginate :page => page, :per_page => 50
end

0 comments on commit 22df303

Please sign in to comment.