From 2324aadcd55007c7e071fefc9312d3cc4bbf007b Mon Sep 17 00:00:00 2001 From: Rick Barrette Date: Mon, 1 Aug 2016 15:31:54 -0400 Subject: [PATCH] Extended search --- app/models/customer.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/models/customer.rb b/app/models/customer.rb index 2a4334c..fc43914 100644 --- a/app/models/customer.rb +++ b/app/models/customer.rb @@ -18,6 +18,8 @@ class Customer < ActiveRecord::Base attr_accessible :name, :notes, :email, :primary_phone, :mobile_phone validates_presence_of :id, :name + acts_as_searchable :columns => ["#{table_name}.name"] + self.primary_key = :id # returns a human readable string