Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Contato < ApplicationRecord
- validates_presence_of:nome
- validates_presence_of:telefone
- def self.search(query)
- where("nome LIKE :q", :q => "%#{query}%")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement