diff --git a/app/models/customer.rb b/app/models/customer.rb index 83d892a..7117766 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -140,6 +140,11 @@ class Customer < ActiveRecord::Base end end + def self.search(search) + where("name LIKE ?", "%#{search}%") + where("id LIKE ?", "%#{search}%") + end + # proforms a bruteforce sync operation # This needs to be simplified def self.sync_by_id(id)